[Scummvm-cvs-logs] SF.net SVN: scummvm:[41154] scummvm/trunk/engines/sci

thebluegr at users.sourceforge.net thebluegr at users.sourceforge.net
Thu Jun 4 10:25:48 CEST 2009


Revision: 41154
          http://scummvm.svn.sourceforge.net/scummvm/?rev=41154&view=rev
Author:   thebluegr
Date:     2009-06-04 08:25:48 +0000 (Thu, 04 Jun 2009)

Log Message:
-----------
Turned debug_weak_validations on by default again, as apparently some games like SQ3 fail in some validations (e.g. when loading). Also, fixed a potential out of bounds access when copying the value of __FILE__ into a buffer (as its value can be quite long in some cases).

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

Modified: scummvm/trunk/engines/sci/console.cpp
===================================================================
--- scummvm/trunk/engines/sci/console.cpp	2009-06-04 01:05:47 UTC (rev 41153)
+++ scummvm/trunk/engines/sci/console.cpp	2009-06-04 08:25:48 UTC (rev 41154)
@@ -50,7 +50,7 @@
 int debug_sleeptime_factor = 1;
 int debug_simulated_key = 0;
 bool debug_track_mouse_clicks = false;
-bool debug_weak_validations = false;
+bool debug_weak_validations = true;
 
 
 Console::Console(SciEngine *vm) : GUI::Debugger() {

Modified: scummvm/trunk/engines/sci/engine/vm.cpp
===================================================================
--- scummvm/trunk/engines/sci/engine/vm.cpp	2009-06-04 01:05:47 UTC (rev 41153)
+++ scummvm/trunk/engines/sci/engine/vm.cpp	2009-06-04 08:25:48 UTC (rev 41154)
@@ -121,15 +121,13 @@
 	if (index < 0 || index >= max) {
 		char txt[200];
 		char tmp[40];
-		sprintf(txt, "[VM] Attempt to use invalid %s variable %04x ", names[type], index);
+		sprintf(txt, "[VM] validate_variable(): Attempt to use invalid %s variable %04x ", names[type], index);
 		if (max == 0)
 			strcat(txt, "(variable type invalid)");
 		else {
 			sprintf(tmp, "(out of range [%d..%d])", 0, max - 1);
 			strcat(txt, tmp);
 		}
-		sprintf(tmp, " in %s, line %d\n", __FILE__, line);
-		strcat(txt, tmp);
 
 		if (debug_weak_validations)
 			warning(txt);


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