mirror of
https://github.com/libretro/scummvm.git
synced 2025-01-19 00:15:30 +00:00
SCUMM: Avoid crash in debugger when omitting the state value in 'object state VALUE'
svn-id: r24572
This commit is contained in:
parent
083a7c2549
commit
32f891f724
@ -491,14 +491,14 @@ bool ScummDebugger::Cmd_Object(int argc, const char **argv) {
|
||||
_vm->markObjectRectAsDirty(obj);
|
||||
_vm->clearDrawObjectQueue();
|
||||
_vm->runInventoryScript(obj);
|
||||
} else if (!strcmp(argv[2], "state")) {
|
||||
} else if (!strcmp(argv[2], "state") && argc == 4) {
|
||||
_vm->putState(obj, atoi(argv[3]));
|
||||
//is BgNeedsRedraw enough?
|
||||
_vm->_bgNeedsRedraw = true;
|
||||
} else if (!strcmp(argv[2], "name")) {
|
||||
DebugPrintf("Name of object %d: %s\n", obj, _vm->getObjOrActorName(obj));
|
||||
} else {
|
||||
DebugPrintf("Unknown object command '%s'\nUse <pickup | state> as command\n", argv[2]);
|
||||
DebugPrintf("Unknown object command '%s'\nUse <pickup | state | name> as command\n", argv[2]);
|
||||
}
|
||||
|
||||
return true;
|
||||
|
Loading…
x
Reference in New Issue
Block a user