[Scummvm-cvs-logs] SF.net SVN: scummvm:[51772] scummvm/trunk/engines/sci/engine/vm.cpp

thebluegr at users.sourceforge.net thebluegr at users.sourceforge.net
Fri Aug 6 01:08:05 CEST 2010


Revision: 51772
          http://scummvm.svn.sourceforge.net/scummvm/?rev=51772&view=rev
Author:   thebluegr
Date:     2010-08-05 23:08:05 +0000 (Thu, 05 Aug 2010)

Log Message:
-----------
SCI: Added a workaround for a script bug in QFG2, room 200, when talking with the astrologer. Fixes bug #3039879, "QFG2: Crash at astrologer's"

Modified Paths:
--------------
    scummvm/trunk/engines/sci/engine/vm.cpp

Modified: scummvm/trunk/engines/sci/engine/vm.cpp
===================================================================
--- scummvm/trunk/engines/sci/engine/vm.cpp	2010-08-05 23:04:57 UTC (rev 51771)
+++ scummvm/trunk/engines/sci/engine/vm.cpp	2010-08-05 23:08:05 UTC (rev 51772)
@@ -135,9 +135,13 @@
 static int validate_arithmetic(reg_t reg) {
 	if (reg.segment) {
 		// The results of this are likely unpredictable... It most likely means that a kernel function is returning something wrong.
-		// If such an error occurs, we usually need to find the last kernel function called and check its return value. Check
-		// callKernelFunc() below
-		error("[VM] Attempt to read arithmetic value from non-zero segment [%04x]. Address: %04x:%04x", reg.segment, PRINT_REG(reg));
+		// If such an error occurs, we usually need to find the last kernel function called and check its return value.
+		if (g_sci->getGameId() == GID_QFG2 && g_sci->getEngineState()->currentRoomNumber() == 200) {
+			// WORKAROUND: This happens in QFG2, room 200, when talking to the astrologer (bug #3039879) - script bug.
+			// Returning 0 in this case.
+		} else {
+			error("[VM] Attempt to read arithmetic value from non-zero segment [%04x]. Address: %04x:%04x", reg.segment, PRINT_REG(reg));
+		}
 		return 0;
 	}
 


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