ScummFile: Don't use the File::_ioFailed flag, rather track the io status separately; also, changed eof() -> eos()
svn-id: r34389
This commit is contained in:
parent
f8bcb0782b
commit
088a1c0806
4 changed files with 12 additions and 8 deletions
|
@ -125,8 +125,8 @@ bool ScummFile::openSubFile(const Common::String &filename) {
|
|||
}
|
||||
|
||||
|
||||
bool ScummFile::eof() {
|
||||
return _subFileLen ? (pos() >= _subFileLen) : File::eof();
|
||||
bool ScummFile::eos() {
|
||||
return _subFileLen ? (pos() >= _subFileLen) : File::eos();
|
||||
}
|
||||
|
||||
uint32 ScummFile::pos() {
|
||||
|
@ -167,7 +167,7 @@ uint32 ScummFile::read(void *dataPtr, uint32 dataSize) {
|
|||
uint32 newPos = curPos + dataSize;
|
||||
if (newPos > _subFileLen) {
|
||||
dataSize = _subFileLen - curPos;
|
||||
_ioFailed = true;
|
||||
_myIoFailed = true;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue