aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorMatthew Hoops2011-06-30 15:50:24 -0400
committerMatthew Hoops2011-06-30 15:51:15 -0400
commitd3717c12741f69facfd76a12675d18ed3c9c5b26 (patch)
treeb2087c81e6b8ff48a2fe3fb24dfd0904a5aa8e8c /engines
parentaa0f307e06e5aae3b12f9f15b350dc81b30d61de (diff)
downloadscummvm-rg350-d3717c12741f69facfd76a12675d18ed3c9c5b26.tar.gz
scummvm-rg350-d3717c12741f69facfd76a12675d18ed3c9c5b26.tar.bz2
scummvm-rg350-d3717c12741f69facfd76a12675d18ed3c9c5b26.zip
MOHAWK: Fix tMOV resources at the end of a file
Thanks to fuzzie for noticing
Diffstat (limited to 'engines')
-rw-r--r--engines/mohawk/resource.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/engines/mohawk/resource.cpp b/engines/mohawk/resource.cpp
index 9b39692958..f01375bacf 100644
--- a/engines/mohawk/resource.cpp
+++ b/engines/mohawk/resource.cpp
@@ -294,7 +294,7 @@ bool MohawkArchive::openStream(Common::SeekableReadStream *stream) {
// We need to do this because of the way Mohawk is set up (this is much more "proper"
// than passing _stream at the right offset). We may want to do that in the future, though.
if (tag == ID_TMOV) {
- if (index == fileTable.size() - 1)
+ if (index == fileTable.size())
res.size = stream->size() - fileTable[index - 1].offset;
else
res.size = fileTable[index].offset - fileTable[index - 1].offset;
@@ -304,7 +304,6 @@ bool MohawkArchive::openStream(Common::SeekableReadStream *stream) {
debug(4, "Entry[%02x]: ID = %04x (%d) Index = %04x", j, id, id, index);
}
-
// Return to next TypeTable entry
stream->seek(absOffset + (i + 1) * 8 + 4);