[Scummvm-cvs-logs] SF.net SVN: scummvm: [30195] scummvm/trunk/engines/saga/sfuncs.cpp

thebluegr at users.sourceforge.net thebluegr at users.sourceforge.net
Thu Jan 3 11:42:18 CET 2008


Revision: 30195
          http://scummvm.svn.sourceforge.net/scummvm/?rev=30195&view=rev
Author:   thebluegr
Date:     2008-01-03 02:42:18 -0800 (Thu, 03 Jan 2008)

Log Message:
-----------
Properly fixed bug #1861863 - "ITE: Crash when using Eeah with Eeah"

Modified Paths:
--------------
    scummvm/trunk/engines/saga/sfuncs.cpp

Modified: scummvm/trunk/engines/saga/sfuncs.cpp
===================================================================
--- scummvm/trunk/engines/saga/sfuncs.cpp	2008-01-03 09:52:24 UTC (rev 30194)
+++ scummvm/trunk/engines/saga/sfuncs.cpp	2008-01-03 10:42:18 UTC (rev 30195)
@@ -396,6 +396,13 @@
 	const HitZone *hitZone;
 	Event event;
 
+	// If the player uses an object and then immediately reuses that object
+	// (without it being shown in the verb area), the object returned is wrong (0),
+	// so we make it equal to the second object here.
+	// Fixes bug #1861863 - "ITE: Crash when using Eeah with Eeah"
+	if (theObject == 0 && objectId == 0 && withObject > 0)
+		theObject = objectId = withObject;
+
 	switch (objectTypeId(objectId)) {
 		case kGameObjectObject:
 			obj = _vm->_actor->getObj(objectId);
@@ -436,8 +443,6 @@
 			break;
 		default:
 			// Unknown case, do nothing
-			// Changing this from an error to a warning should fix bug
-			// #1861863 - "ITE: Crash when using Eeah with Eeah"
 			warning("Script::sfScriptDoAction wrong object type 0x%X", objectId);
 			return;
 	}


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