diff options
author | Martin Kiewitz | 2010-07-21 17:42:51 +0000 |
---|---|---|
committer | Martin Kiewitz | 2010-07-21 17:42:51 +0000 |
commit | bb1c722a0b2b9e35f21ddef8109c443d6b69a620 (patch) | |
tree | bd9b7d90973094bd0dbea1a7bf65eab2ac6c7794 /engines | |
parent | 175d6e297d5d50a96f1af6ddc2e37c7c56f84763 (diff) | |
download | scummvm-rg350-bb1c722a0b2b9e35f21ddef8109c443d6b69a620.tar.gz scummvm-rg350-bb1c722a0b2b9e35f21ddef8109c443d6b69a620.tar.bz2 scummvm-rg350-bb1c722a0b2b9e35f21ddef8109c443d6b69a620.zip |
SCI: adding workaround for sq3
fixing off-by-one error when initializing script 93
svn-id: r51091
Diffstat (limited to 'engines')
-rw-r--r-- | engines/sci/engine/script.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/engines/sci/engine/script.cpp b/engines/sci/engine/script.cpp index 049ea9247b..eb6ff95a3d 100644 --- a/engines/sci/engine/script.cpp +++ b/engines/sci/engine/script.cpp @@ -434,16 +434,17 @@ void Script::initialiseClasses(SegManager *segMan) { } if (isClass) { - // WORKAROUND for an invalid species access in the demo of LSL2 + // WORKAROUNDs for off-by-one script errors if (g_sci->getGameId() == GID_LSL2 && g_sci->isDemo() && species == (int)segMan->classTableSize()) segMan->resizeClassTable(segMan->classTableSize() + 1); - // WORKAROUND for an invalid species access in LSL3 script 500 if (g_sci->getGameId() == GID_LSL3 && !g_sci->isDemo() && _nr == 500 && species == (int)segMan->classTableSize()) segMan->resizeClassTable(segMan->classTableSize() + 1); + if (g_sci->getGameId() == GID_SQ3 && !g_sci->isDemo() && _nr == 93 && species == (int)segMan->classTableSize()) + segMan->resizeClassTable(segMan->classTableSize() + 1); if (species < 0 || species >= (int)segMan->classTableSize()) - error("Invalid species %d(0x%x) not in interval [0,%d) while instantiating script %d\n", - species, species, segMan->classTableSize(), _nr); + error("Invalid species %d(0x%x) unknown max %d(0x%x) while instantiating script %d\n", + species, species, segMan->classTableSize(), segMan->classTableSize(), _nr); SegmentId segmentId = segMan->getScriptSegment(_nr); segMan->setClassOffset(species, make_reg(segmentId, classpos)); |