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

thebluegr at users.sourceforge.net thebluegr at users.sourceforge.net
Mon Jun 21 22:17:59 CEST 2010


Revision: 50121
          http://scummvm.svn.sourceforge.net/scummvm/?rev=50121&view=rev
Author:   thebluegr
Date:     2010-06-21 20:17:59 +0000 (Mon, 21 Jun 2010)

Log Message:
-----------
When loading or restarting, stop script processing if the game is being loaded or is restarting and the stack position has changed (it's always changed when loading) - fixes the case where the VM is trying to parse an invalid script

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-06-21 19:32:25 UTC (rev 50120)
+++ scummvm/trunk/engines/sci/engine/vm.cpp	2010-06-21 20:17:59 UTC (rev 50121)
@@ -773,6 +773,9 @@
 		g_debugState.old_pc_offset = s->xs->addr.pc.offset;
 		g_debugState.old_sp = s->xs->sp;
 
+		if (s->abortScriptProcessing != kAbortNone || g_engine->shouldQuit())
+			return; // Stop processing
+
 		if (s->_executionStackPosChanged) {
 			Script *scr;
 			s->xs = &(s->_executionStack.back());
@@ -829,7 +832,7 @@
 		}
 
 		if (s->abortScriptProcessing != kAbortNone || g_engine->shouldQuit())
-			return; // Emergency
+			return; // Stop processing
 
 		// Debug if this has been requested:
 		// TODO: re-implement sci_debug_flags


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