[Scummvm-cvs-logs] SF.net SVN: scummvm: [21501] scummvm/trunk/engines/scumm/he/script_v90he.cpp

kirben at users.sourceforge.net kirben at users.sourceforge.net
Wed Mar 29 16:33:02 CEST 2006


Revision: 21501
Author:   kirben
Date:     2006-03-29 16:32:29 -0800 (Wed, 29 Mar 2006)
ViewCVS:  http://svn.sourceforge.net/scummvm/?rev=21501&view=rev

Log Message:
-----------
Add missing check for invalid object number in getObjectData opcode

Modified Paths:
--------------
    scummvm/trunk/engines/scumm/he/script_v90he.cpp
Modified: scummvm/trunk/engines/scumm/he/script_v90he.cpp
===================================================================
--- scummvm/trunk/engines/scumm/he/script_v90he.cpp	2006-03-29 15:59:37 UTC (rev 21500)
+++ scummvm/trunk/engines/scumm/he/script_v90he.cpp	2006-03-30 00:32:29 UTC (rev 21501)
@@ -2347,7 +2347,10 @@
 			push(_objs[_heObjectNum].height);
 		break;
 	case 4:
-		push(getObjectImageCount(_heObject));
+		if (_heObjectNum == -1)
+			push(0);
+		else
+			push(getObjectImageCount(_heObject));
 		break;
 	case 6:
 		if (_heObjectNum == -1)


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