aboutsummaryrefslogtreecommitdiff
path: root/engines/access
diff options
context:
space:
mode:
authorPaul Gilbert2014-08-07 19:43:42 -0400
committerPaul Gilbert2014-08-07 19:43:42 -0400
commit010ba5b1262f58eabd6e8fbca710309cf7e2c003 (patch)
treeddc204cd35814196e0de277b1f361b5b14ac7531 /engines/access
parentbea93f3441154197a8f599912a1102ac11688d7f (diff)
downloadscummvm-rg350-010ba5b1262f58eabd6e8fbca710309cf7e2c003.tar.gz
scummvm-rg350-010ba5b1262f58eabd6e8fbca710309cf7e2c003.tar.bz2
scummvm-rg350-010ba5b1262f58eabd6e8fbca710309cf7e2c003.zip
ACCESS: Fix reading last resource of container files
Diffstat (limited to 'engines/access')
-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;