diff options
author | Max Horn | 2003-05-31 14:20:24 +0000 |
---|---|---|
committer | Max Horn | 2003-05-31 14:20:24 +0000 |
commit | 7b96eb0c2afae21c24d4c601401bd6f67c3042f7 (patch) | |
tree | 0af1bc1eff292a4c142de0fde6c72f5fc9619c56 /scumm | |
parent | b0b9c354d1347d7b35b156408ac67e7bf3305ad8 (diff) | |
download | scummvm-rg350-7b96eb0c2afae21c24d4c601401bd6f67c3042f7.tar.gz scummvm-rg350-7b96eb0c2afae21c24d4c601401bd6f67c3042f7.tar.bz2 scummvm-rg350-7b96eb0c2afae21c24d4c601401bd6f67c3042f7.zip |
fixed debugger command params bug
svn-id: r8176
Diffstat (limited to 'scumm')
-rw-r--r-- | scumm/debugger.cpp | 19 |
1 files changed, 4 insertions, 15 deletions
diff --git a/scumm/debugger.cpp b/scumm/debugger.cpp index 0cd0577a73..512527d1cc 100644 --- a/scumm/debugger.cpp +++ b/scumm/debugger.cpp @@ -247,8 +247,9 @@ bool ScummDebugger::RunCommand(const char *inputOrig) { 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_DebugLevel(int argc, const char **argv) { 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 @@ bool ScummDebugger::Cmd_PrintBox(int argc, const char **argv) { } void ScummDebugger::printBox(int box) { + assert(box < _s->getNumBoxes()); BoxCoords coords; int flags = _s->getBoxFlags(box); int mask = _s->getMaskFromBox(box); |