From d183fb3c8107c5d990edf64a69486692040b0013 Mon Sep 17 00:00:00 2001 From: Martin Kiewitz Date: Tue, 5 Jan 2010 20:39:21 +0000 Subject: SCI: fix debug command draw_pic to accept higher resourceIds svn-id: r47039 --- engines/sci/console.cpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'engines') 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; -- cgit v1.2.3