[Scummvm-cvs-logs] SF.net SVN: scummvm:[46848] scummvm/trunk/engines/saga/script.h

lordhoto at users.sourceforge.net lordhoto at users.sourceforge.net
Fri Jan 1 21:37:08 CET 2010


Revision: 46848
          http://scummvm.svn.sourceforge.net/scummvm/?rev=46848&view=rev
Author:   lordhoto
Date:     2010-01-01 20:37:02 +0000 (Fri, 01 Jan 2010)

Log Message:
-----------
Fix undefined operation in setNoPendingVerb (someone with knowledge of SAGA should review this, see the TODO comment). (Thanks to syke for reporting this)

Modified Paths:
--------------
    scummvm/trunk/engines/saga/script.h

Modified: scummvm/trunk/engines/saga/script.h
===================================================================
--- scummvm/trunk/engines/saga/script.h	2010-01-01 20:26:18 UTC (rev 46847)
+++ scummvm/trunk/engines/saga/script.h	2010-01-01 20:37:02 UTC (rev 46848)
@@ -333,7 +333,16 @@
 	}
 	void setNoPendingVerb() {
 		_pendingVerb = getVerbType(kVerbNone);
-		_currentObject[0] = _currentObject[0] = ID_NOTHING;
+		// TODO: Someone with knowledge of SAGA should review this.
+		// This initially looked like:
+		// _currentObject[0] = _currentObject[0] = ID_NOTHING;
+		// and thus was an undefined operation on _currentObject[0]
+		// according to the C(++) standard.
+		// Now the question is whether this should really reset
+		// both objets or just _currentObject[0].
+		// In case the current code is ok, just remove the TODO,
+		// otherwise fix the code and remove the TODO.
+		_currentObject[0] = _currentObject[1] = ID_NOTHING;
 		setPointerVerb();
 	}
 	int getVerbType(VerbTypes verbType);


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