diff options
author | Walter van Niftrik | 2009-08-10 18:59:59 +0000 |
---|---|---|
committer | Walter van Niftrik | 2009-08-10 18:59:59 +0000 |
commit | 7dfa30d3fe285590232b48214e296681371234f5 (patch) | |
tree | a911a50d85d7934a422262141b8fa1f5ac2cd93f /engines | |
parent | 867b1c2b4d0f815a1d8c54911e56e3f6c2312408 (diff) | |
download | scummvm-rg350-7dfa30d3fe285590232b48214e296681371234f5.tar.gz scummvm-rg350-7dfa30d3fe285590232b48214e296681371234f5.tar.bz2 scummvm-rg350-7dfa30d3fe285590232b48214e296681371234f5.zip |
SCI: Fix vmvars debug command.
svn-id: r43219
Diffstat (limited to 'engines')
-rw-r--r-- | engines/sci/console.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/engines/sci/console.cpp b/engines/sci/console.cpp index 2ddc6979c9..9ced68e0d0 100644 --- a/engines/sci/console.cpp +++ b/engines/sci/console.cpp @@ -165,7 +165,7 @@ Console::Console(SciEngine *vm) : GUI::Debugger() { // VM DCmd_Register("script_steps", WRAP_METHOD(Console, cmdScriptSteps)); DCmd_Register("vm_varlist", WRAP_METHOD(Console, cmdVMVarlist)); - DCmd_Register("vm_vars", WRAP_METHOD(Console, cmdVMVars)); + DCmd_Register("vmvars", WRAP_METHOD(Console, cmdVMVars)); DCmd_Register("stack", WRAP_METHOD(Console, cmdStack)); DCmd_Register("value_type", WRAP_METHOD(Console, cmdValueType)); DCmd_Register("view_listnode", WRAP_METHOD(Console, cmdViewListNode)); @@ -1713,7 +1713,7 @@ bool Console::cmdVMVarlist(int argc, const char **argv) { } bool Console::cmdVMVars(int argc, const char **argv) { - if (argc < 2) { + if (argc < 3) { DebugPrintf("Displays or changes variables in the VM\n"); DebugPrintf("Usage: %s <type> <varnum> [<value>]\n", argv[0]); DebugPrintf("First parameter is either g(lobal), l(ocal), t(emp) or p(aram).\n"); @@ -1747,10 +1747,10 @@ bool Console::cmdVMVars(int argc, const char **argv) { } switch (argc) { - case 2: + case 3: DebugPrintf("%s var %d == %04x:%04x\n", varnames[vartype], idx, PRINT_REG(scriptState.variables[vartype][idx])); break; - case 3: + case 4: if (parse_reg_t(_vm->_gamestate, argv[3], &scriptState.variables[vartype][idx])) { DebugPrintf("Invalid address passed.\n"); DebugPrintf("Check the \"addresses\" command on how to use addresses\n"); |