[Scummvm-cvs-logs] SF.net SVN: scummvm:[47039] scummvm/trunk/engines/sci/console.cpp

m_kiewitz at users.sourceforge.net m_kiewitz at users.sourceforge.net
Tue Jan 5 21:39:21 CET 2010


Revision: 47039
          http://scummvm.svn.sourceforge.net/scummvm/?rev=47039&view=rev
Author:   m_kiewitz
Date:     2010-01-05 20:39:21 +0000 (Tue, 05 Jan 2010)

Log Message:
-----------
SCI: fix debug command draw_pic to accept higher resourceIds

Modified Paths:
--------------
    scummvm/trunk/engines/sci/console.cpp

Modified: scummvm/trunk/engines/sci/console.cpp
===================================================================
--- scummvm/trunk/engines/sci/console.cpp	2010-01-05 20:15:29 UTC (rev 47038)
+++ scummvm/trunk/engines/sci/console.cpp	2010-01-05 20:39:21 UTC (rev 47039)
@@ -977,7 +977,15 @@
 		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;


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.




More information about the Scummvm-git-logs mailing list