[Scummvm-cvs-logs] CVS: scummvm/scumm boxes.cpp,1.46,1.47

Max Horn fingolfin at users.sourceforge.net
Tue Jul 15 12:21:16 CEST 2003


Update of /cvsroot/scummvm/scummvm/scumm
In directory sc8-pr-cvs1:/tmp/cvs-serv20686

Modified Files:
	boxes.cpp 
Log Message:
fix for bug #771803

Index: boxes.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/boxes.cpp,v
retrieving revision 1.46
retrieving revision 1.47
diff -u -d -r1.46 -r1.47
--- boxes.cpp	13 Jul 2003 19:50:35 -0000	1.46
+++ boxes.cpp	15 Jul 2003 19:20:40 -0000	1.47
@@ -238,9 +238,15 @@
 	// this also seems to be incorrect for atari st demo of zak
 	// and assumingly other v2 games
 	// The same happens in Indy3EGA (see bug #770351)
-	if (_gameId == GID_MONKEY_EGA || _gameId == GID_INDY3) {
-		if (box < 0 || box > ptr[0] - 1)
-			warning("Illegal box %d", box);
+	// Also happend in ZakEGA (see bug #771803).
+	//
+	// This *might* mean that we have a bug in our box implementation
+	// OTOH, the original engine, unlike ScummVM, performed no bound
+	// 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_MONKEY_EGA || _gameId == GID_INDY3 || _gameId == GID_ZAK) {
+		checkRange(ptr[0], 0, box, "Illegal box %d");
 	} else
 		checkRange(ptr[0] - 1, 0, box, "Illegal box %d");
 





More information about the Scummvm-git-logs mailing list