diff options
author | Max Horn | 2003-12-25 22:49:10 +0000 |
---|---|---|
committer | Max Horn | 2003-12-25 22:49:10 +0000 |
commit | 27e32a7b4223dd45370c45f5a4cd9bd279fed36a (patch) | |
tree | a571f6b0360e2634c21bfe06cce34b2c85e06386 /scumm | |
parent | cb628da846d37fc275e69a1a264c146fc59da0b9 (diff) | |
download | scummvm-rg350-27e32a7b4223dd45370c45f5a4cd9bd279fed36a.tar.gz scummvm-rg350-27e32a7b4223dd45370c45f5a4cd9bd279fed36a.tar.bz2 scummvm-rg350-27e32a7b4223dd45370c45f5a4cd9bd279fed36a.zip |
fix debugger
svn-id: r11930
Diffstat (limited to 'scumm')
-rw-r--r-- | scumm/debugger.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
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 <actornum> <command> <parameter>\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; |