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

thebluegr at users.sourceforge.net thebluegr at users.sourceforge.net
Wed Jun 30 09:18:43 CEST 2010


Revision: 50515
          http://scummvm.svn.sourceforge.net/scummvm/?rev=50515&view=rev
Author:   thebluegr
Date:     2010-06-30 07:18:43 +0000 (Wed, 30 Jun 2010)

Log Message:
-----------
When deleting a list node, erase its references to predecessor and successor nodes. Fixes cases where game scripts could reference a list node after it was deleted (e.g. QFG1 intro, Longbow when exiting the cave). Some slight cleanup

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

Modified: scummvm/trunk/engines/sci/engine/klists.cpp
===================================================================
--- scummvm/trunk/engines/sci/engine/klists.cpp	2010-06-30 04:46:55 UTC (rev 50514)
+++ scummvm/trunk/engines/sci/engine/klists.cpp	2010-06-30 07:18:43 UTC (rev 50515)
@@ -346,7 +346,9 @@
 	if (!n->succ.isNull())
 		s->_segMan->lookupNode(n->succ)->pred = n->pred;
 
-	//s->_segMan->free_Node(node_pos);	// TODO
+	// Erase references to the predecessor and successor nodes
+	n->pred = NULL_REG;
+	n->succ = NULL_REG;
 
 	return make_reg(0, 1); // Signal success
 }

Modified: scummvm/trunk/engines/sci/engine/savegame.cpp
===================================================================
--- scummvm/trunk/engines/sci/engine/savegame.cpp	2010-06-30 04:46:55 UTC (rev 50514)
+++ scummvm/trunk/engines/sci/engine/savegame.cpp	2010-06-30 07:18:43 UTC (rev 50515)
@@ -74,9 +74,7 @@
 
 #ifdef USE_OLD_MUSIC_FUNCTIONS
 static void sync_songlib(Common::Serializer &s, SongLibrary &obj);
-#endif
 
-#ifdef USE_OLD_MUSIC_FUNCTIONS
 static void syncSong(Common::Serializer &s, Song &obj) {
 	s.syncAsSint32LE(obj._handle);
 	s.syncAsSint32LE(obj._resourceNum);


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