[Scummvm-cvs-logs] CVS: scummvm/scumm debugger.cpp,1.100,1.101

Max Horn fingolfin at users.sourceforge.net
Thu Dec 25 14:50:00 CET 2003


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

Modified Files:
	debugger.cpp 
Log Message:
fix debugger

Index: debugger.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/debugger.cpp,v
retrieving revision 1.100
retrieving revision 1.101
diff -u -d -r1.100 -r1.101
--- debugger.cpp	25 Dec 2003 21:56:12 -0000	1.100
+++ debugger.cpp	25 Dec 2003 22:49:10 -0000	1.101
@@ -348,7 +348,7 @@
 bool ScummDebugger::Cmd_Actor(int argc, const char **argv) {
 	Actor *a;
 	int actnum;
-	int value;
+	int value = 0;
 
 	if (argc < 3) {
 		DebugPrintf("Syntax: actor <actornum> <command> <parameter>\n");
@@ -362,7 +362,8 @@
 	}
 
 	a = &_vm->_actors[actnum];
-	value = atoi(argv[3]);
+	if (argc > 3)
+		value = atoi(argv[3]);
 
 	if (!strcmp(argv[2], "ignoreboxes")) {
 		a->ignoreBoxes = (value > 0);
@@ -381,7 +382,7 @@
 		_vm->_fullRedraw = 1;
 	} else if (!strcmp(argv[2], "costume")) {
 		if (value >= _vm->res.num[rtCostume])
-				DebugPrintf("Costume not changed as %d exceeds max of %d\n", value, _vm->res.num[rtCostume]);
+			DebugPrintf("Costume not changed as %d exceeds max of %d\n", value, _vm->res.num[rtCostume]);
 		else {
 			a->setActorCostume( value );
 			_vm->_fullRedraw = 1;





More information about the Scummvm-git-logs mailing list