[Scummvm-cvs-logs] CVS: scummvm/scumm debugger.cpp,1.54,1.55

Max Horn fingolfin at users.sourceforge.net
Sat May 31 07:21:04 CEST 2003


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

Modified Files:
	debugger.cpp 
Log Message:
fixed debugger command params bug

Index: debugger.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/debugger.cpp,v
retrieving revision 1.54
retrieving revision 1.55
diff -u -d -r1.54 -r1.55
--- debugger.cpp	28 May 2003 22:27:38 -0000	1.54
+++ debugger.cpp	31 May 2003 14:20:24 -0000	1.55
@@ -247,8 +247,9 @@
 
 	for(i=0; i < _dcmd_count; i++) {
 		if (!strcmp(_dcmds[i].name, param[0])) {
+			bool result = (this->*_dcmds[i].function)(num_params, param);
 			free(input);
-			return (this->*_dcmds[i].function)(num_params, param);
+			return result;
 		}
 	}
 
@@ -718,25 +719,12 @@
 
 bool ScummDebugger::Cmd_PrintBox(int argc, const char **argv) {
 	int num, i = 0;
-	num = _s->getNumBoxes();
 
 	if (argc > 1) {
 		for (i = 1; i < argc; i++)
 			printBox(atoi(argv[i]));
 	} else {
-/*
-	byte *boxm = _s->getBoxMatrixBaseAddr();
-
-	Debug_Printf("Walk matrix:\n");
-	for (i = 0; i < num; i++) {
-		while (*boxm != 0xFF) {
-			Debug_Printf("[%d] ", *boxm);
-			boxm++;
-		}
-		boxm++;
-		Debug_Printf("\n");
-	}
-*/
+		num = _s->getNumBoxes();
 		Debug_Printf("\nWalk boxes:\n");
 		for (i = 0; i < num; i++)
 			printBox(i);
@@ -745,6 +733,7 @@
 }
 
 void ScummDebugger::printBox(int box) {
+	assert(box < _s->getNumBoxes());
 	BoxCoords coords;
 	int flags = _s->getBoxFlags(box);
 	int mask = _s->getMaskFromBox(box);





More information about the Scummvm-git-logs mailing list