aboutsummaryrefslogtreecommitdiff
path: root/scumm/boxes.cpp
diff options
context:
space:
mode:
authorTravis Howell2004-09-03 00:22:31 +0000
committerTravis Howell2004-09-03 00:22:31 +0000
commit077d977834f00758d7484e2e146cad39b2e64a65 (patch)
treebbb8112cfc5f4e3a79465a4b7e7796c64645b9ca /scumm/boxes.cpp
parent8f6e066374bf783dcfbb7c4f4e374b68db9df5da (diff)
downloadscummvm-rg350-077d977834f00758d7484e2e146cad39b2e64a65.tar.gz
scummvm-rg350-077d977834f00758d7484e2e146cad39b2e64a65.tar.bz2
scummvm-rg350-077d977834f00758d7484e2e146cad39b2e64a65.zip
Add fingolfin's suggested solution for bug #881132
svn-id: r14869
Diffstat (limited to 'scumm/boxes.cpp')
-rw-r--r--scumm/boxes.cpp8
1 files changed, 3 insertions, 5 deletions
diff --git a/scumm/boxes.cpp b/scumm/boxes.cpp
index 47fc8e3c6a..ca0ec60464 100644
--- a/scumm/boxes.cpp
+++ b/scumm/boxes.cpp
@@ -374,12 +374,10 @@ Box *ScummEngine::getBoxBaseAddr(int box) {
// checking at all. All the problems so far have been cases where
// the value was exactly one more than what we consider the maximum.
// So it's very well possible that all of these are script errors.
- if ((_gameId == GID_PASS) || ((_features & GF_OLD_BUNDLE)
- && (_gameId == GID_INDY3 || _gameId == GID_ZAK))) {
- checkRange(ptr[0], 0, box, "Illegal box %d");
- } else
- checkRange(ptr[0] - 1, 0, box, "Illegal box %d");
+ if (_version <= 4 && ptr[0] == box)
+ box--;
+ checkRange(ptr[0] - 1, 0, box, "Illegal box %d");
if (_version <= 2)
return (Box *)(ptr + box * SIZEOF_BOX_V2 + 1);
else if (_version == 3)