From 010ba5b1262f58eabd6e8fbca710309cf7e2c003 Mon Sep 17 00:00:00 2001 From: Paul Gilbert Date: Thu, 7 Aug 2014 19:43:42 -0400 Subject: ACCESS: Fix reading last resource of container files --- engines/access/files.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'engines') 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; -- cgit v1.2.3