[Scummvm-cvs-logs] SF.net SVN: scummvm:[35779] scummvm/trunk/engines/groovie/groovie.cpp

jvprat at users.sourceforge.net jvprat at users.sourceforge.net
Thu Jan 8 00:05:36 CET 2009


Revision: 35779
          http://scummvm.svn.sourceforge.net/scummvm/?rev=35779&view=rev
Author:   jvprat
Date:     2009-01-07 23:05:28 +0000 (Wed, 07 Jan 2009)

Log Message:
-----------
Fix an invalid access when the quit opcode occupies the last byte of the script, due to the quit status being updated by the event loop

Modified Paths:
--------------
    scummvm/trunk/engines/groovie/groovie.cpp

Modified: scummvm/trunk/engines/groovie/groovie.cpp
===================================================================
--- scummvm/trunk/engines/groovie/groovie.cpp	2009-01-07 22:35:35 UTC (rev 35778)
+++ scummvm/trunk/engines/groovie/groovie.cpp	2009-01-07 23:05:28 UTC (rev 35779)
@@ -123,7 +123,7 @@
 				// A new entry
 				index++;
 			} else if (line.hasPrefix("boot: ") && index == _gameDescription->indexEntry) {
-				// It's the boot of the entry were looking for,
+				// It's the boot of the entry we're looking for,
 				// get the script filename
 				filename = line.c_str() + 6;
 				found = true;
@@ -219,6 +219,12 @@
 			}
 		}
 
+		// The event loop may have triggered the quit status. In this case,
+		// stop the execution.
+		if (shouldQuit()) {
+			continue;
+		}
+
 		if (_waitingForInput) {
 			// Still waiting for input, just update the mouse, game timer and then wait a bit more
 			_cursorMan->animate();


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