[Scummvm-cvs-logs] SF.net SVN: scummvm:[51091] scummvm/trunk/engines/sci/engine/script.cpp

m_kiewitz at users.sourceforge.net m_kiewitz at users.sourceforge.net
Wed Jul 21 19:42:51 CEST 2010


Revision: 51091
          http://scummvm.svn.sourceforge.net/scummvm/?rev=51091&view=rev
Author:   m_kiewitz
Date:     2010-07-21 17:42:51 +0000 (Wed, 21 Jul 2010)

Log Message:
-----------
SCI: adding workaround for sq3

fixing off-by-one error when initializing script 93

Modified Paths:
--------------
    scummvm/trunk/engines/sci/engine/script.cpp

Modified: scummvm/trunk/engines/sci/engine/script.cpp
===================================================================
--- scummvm/trunk/engines/sci/engine/script.cpp	2010-07-21 14:54:06 UTC (rev 51090)
+++ scummvm/trunk/engines/sci/engine/script.cpp	2010-07-21 17:42:51 UTC (rev 51091)
@@ -434,16 +434,17 @@
 		}
 
 		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));


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.




More information about the Scummvm-git-logs mailing list