From 27e32a7b4223dd45370c45f5a4cd9bd279fed36a Mon Sep 17 00:00:00 2001 From: Max Horn Date: Thu, 25 Dec 2003 22:49:10 +0000 Subject: fix debugger svn-id: r11930 --- scumm/debugger.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'scumm') diff --git a/scumm/debugger.cpp b/scumm/debugger.cpp index 25ce18a830..ffa4292974 100644 --- a/scumm/debugger.cpp +++ b/scumm/debugger.cpp @@ -348,7 +348,7 @@ bool ScummDebugger::Cmd_PrintScript(int argc, const char **argv) { bool ScummDebugger::Cmd_Actor(int argc, const char **argv) { Actor *a; int actnum; - int value; + int value = 0; if (argc < 3) { DebugPrintf("Syntax: actor \n"); @@ -362,7 +362,8 @@ bool ScummDebugger::Cmd_Actor(int argc, const char **argv) { } 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 @@ bool ScummDebugger::Cmd_Actor(int argc, const char **argv) { _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; -- cgit v1.2.3