From 7dfa30d3fe285590232b48214e296681371234f5 Mon Sep 17 00:00:00 2001 From: Walter van Niftrik Date: Mon, 10 Aug 2009 18:59:59 +0000 Subject: SCI: Fix vmvars debug command. svn-id: r43219 --- engines/sci/console.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'engines') 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 []\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"); -- cgit v1.2.3