aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorMartin Kiewitz2010-01-05 20:39:21 +0000
committerMartin Kiewitz2010-01-05 20:39:21 +0000
commitd183fb3c8107c5d990edf64a69486692040b0013 (patch)
tree5991f76ca4be513ac61f5c5b8f36c3aab7f67e95 /engines
parente4a6b1c455e57d24595db27e0239e01fb8bd5bf9 (diff)
downloadscummvm-rg350-d183fb3c8107c5d990edf64a69486692040b0013.tar.gz
scummvm-rg350-d183fb3c8107c5d990edf64a69486692040b0013.tar.bz2
scummvm-rg350-d183fb3c8107c5d990edf64a69486692040b0013.zip
SCI: fix debug command draw_pic to accept higher resourceIds
svn-id: r47039
Diffstat (limited to 'engines')
-rw-r--r--engines/sci/console.cpp10
1 files changed, 9 insertions, 1 deletions
diff --git a/engines/sci/console.cpp b/engines/sci/console.cpp
index d29ea7126e..c92c72a13a 100644
--- a/engines/sci/console.cpp
+++ b/engines/sci/console.cpp
@@ -977,7 +977,15 @@ bool Console::cmdDrawPic(int argc, const char **argv) {
return true;
}
- _vm->_gamestate->_gui->drawPicture(atoi(argv[1]), 100, false, false, false, 0);
+ char *offsetStr = NULL;
+ uint16 resourceId = strtol(argv[1], &offsetStr, 10);
+
+ if (*offsetStr) {
+ DebugPrintf("Invalid resourceId\n");
+ return true;
+ }
+
+ _vm->_gamestate->_gui->drawPicture(resourceId, 100, false, false, false, 0);
_vm->_gamestate->_gui->animateShowPic();
return false;