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

m_kiewitz at users.sourceforge.net m_kiewitz at users.sourceforge.net
Thu Jun 24 23:42:09 CEST 2010


Revision: 50236
          http://scummvm.svn.sourceforge.net/scummvm/?rev=50236&view=rev
Author:   m_kiewitz
Date:     2010-06-24 21:42:08 +0000 (Thu, 24 Jun 2010)

Log Message:
-----------
SCI: ignore segment 0xFFFF in segmanager getchar, when offset > 1 - so we dont write a warning, if the scripts use some uninitialized temp variable as terminator

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

Modified: scummvm/trunk/engines/sci/engine/seg_manager.cpp
===================================================================
--- scummvm/trunk/engines/sci/engine/seg_manager.cpp	2010-06-24 21:32:29 UTC (rev 50235)
+++ scummvm/trunk/engines/sci/engine/seg_manager.cpp	2010-06-24 21:42:08 UTC (rev 50236)
@@ -612,8 +612,12 @@
 
 	reg_t val = ref.reg[offset / 2];
 
+	// segment 0xFFFF means that the scripts are using uninitialized temp-variable space
+	//  we can safely ignore this, if it isn't one of the first 2 chars.
+	//  foreign lsl3 uses kFileIO(readraw) and then immediately uses kReadNumber right at the start
 	if (val.segment != 0)
-		warning("Attempt to read character from non-raw data");
+		if ((offset > 1) && val.segment == 0xFFFF)
+			warning("Attempt to read character from non-raw data");
 
 	return (offset & 1 ? val.offset >> 8 : val.offset & 0xff);
 }


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