aboutsummaryrefslogtreecommitdiff
path: root/engines/mohawk/resource.cpp
diff options
context:
space:
mode:
authorMatthew Hoops2010-12-05 00:45:21 +0000
committerMatthew Hoops2010-12-05 00:45:21 +0000
commit9a8539e1d8122d61db3fc90ad71a3ffae23e4bf9 (patch)
treebb39af0bf99d4e5213cf4ef1a5d193fe359f1122 /engines/mohawk/resource.cpp
parent4a8d68f3d327b3f1bdaffa9540d4460afdb283c4 (diff)
downloadscummvm-rg350-9a8539e1d8122d61db3fc90ad71a3ffae23e4bf9.tar.gz
scummvm-rg350-9a8539e1d8122d61db3fc90ad71a3ffae23e4bf9.tar.bz2
scummvm-rg350-9a8539e1d8122d61db3fc90ad71a3ffae23e4bf9.zip
MOHAWK: Fix tMOV resources at the end of the file list (thanks, fuzzie)
svn-id: r54774
Diffstat (limited to 'engines/mohawk/resource.cpp')
-rw-r--r--engines/mohawk/resource.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/engines/mohawk/resource.cpp b/engines/mohawk/resource.cpp
index abade641eb..2b423ff419 100644
--- a/engines/mohawk/resource.cpp
+++ b/engines/mohawk/resource.cpp
@@ -320,7 +320,7 @@ Common::SeekableReadStream *MohawkArchive::getResource(uint32 tag, uint16 id) {
// We need to do this because of the way Mohawk is set up (this is much more "proper"
// than passing _mhk at the right offset). We may want to do that in the future, though.
if (_types[typeIndex].tag == ID_TMOV) {
- if (fileTableIndex == _fileTableAmount)
+ if (fileTableIndex == _fileTableAmount - 1)
return new Common::SeekableSubReadStream(_mhk, _fileTable[fileTableIndex].offset, _mhk->size());
else
return new Common::SeekableSubReadStream(_mhk, _fileTable[fileTableIndex].offset, _fileTable[fileTableIndex + 1].offset);