[Scummvm-cvs-logs] CVS: scummvm/scumm debugger.cpp,1.103,1.104

Max Horn fingolfin at users.sourceforge.net
Tue Dec 30 15:06:01 CET 2003


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

Modified Files:
	debugger.cpp 
Log Message:
be a bit more gentle to people typing in invalid box IDs :-)

Index: debugger.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/debugger.cpp,v
retrieving revision 1.103
retrieving revision 1.104
diff -u -d -r1.103 -r1.104
--- debugger.cpp	30 Dec 2003 22:50:55 -0000	1.103
+++ debugger.cpp	30 Dec 2003 23:05:34 -0000	1.104
@@ -582,7 +582,10 @@
 }
 
 void ScummDebugger::printBox(int box) {
-	assert(box < _vm->getNumBoxes());
+	if (box < 0 || box >= _vm->getNumBoxes()) {
+		DebugPrintf("%d is not a valid box!\n", box);
+		return;
+	}
 	BoxCoords coords;
 	int flags = _vm->getBoxFlags(box);
 	int mask = _vm->getMaskFromBox(box);





More information about the Scummvm-git-logs mailing list