aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFilippos Karapetis2010-05-19 23:29:27 +0000
committerFilippos Karapetis2010-05-19 23:29:27 +0000
commit678411ae5e2dafd8878ddec119671611a4a39541 (patch)
treedf773bbf8fd5afb601782c8d6b3716cef05b9223
parent264fde962b564d6c37040c51724c70b3524a394c (diff)
downloadscummvm-rg350-678411ae5e2dafd8878ddec119671611a4a39541.tar.gz
scummvm-rg350-678411ae5e2dafd8878ddec119671611a4a39541.tar.bz2
scummvm-rg350-678411ae5e2dafd8878ddec119671611a4a39541.zip
Slight bugfix in the object iteration inside getSierraGameId()
svn-id: r49110
-rw-r--r--engines/sci/detection.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/engines/sci/detection.cpp b/engines/sci/detection.cpp
index 63fc95e04e..2a83c8e32a 100644
--- a/engines/sci/detection.cpp
+++ b/engines/sci/detection.cpp
@@ -232,7 +232,8 @@ Common::String getSierraGameId(ResourceManager *resMan) {
exportsOffset = READ_UINT16(script000->_buf + curOffset + 2);
break;
}
- } while (objType != 0);
+ curOffset += objLength - 4;
+ } while (objType != 0 && curOffset < script->size - 2);
// The game object is the first export. Script 0 is always at segment 1
reg_t gameObj = make_reg(1, exportsOffset);