aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--engines/access/files.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/engines/access/files.cpp b/engines/access/files.cpp
index c72d0adb7a..23171dcfe7 100644
--- a/engines/access/files.cpp
+++ b/engines/access/files.cpp
@@ -141,7 +141,8 @@ void FileManager::setAppended(int fileNum) {
void FileManager::gotoAppended(int subfile) {
uint32 offset = _fileIndex[subfile];
- uint32 size = _fileIndex[subfile + 1] - offset;
+ uint32 size = (subfile == _fileIndex.size() - 1) ? _file.size() - offset :
+ _fileIndex[subfile + 1] - offset;
_file.seek(offset);
delete _stream;