[Scummvm-cvs-logs] CVS: scummvm/simon simon.cpp,1.460,1.461

Gregory Montoir cyx at users.sourceforge.net
Wed Nov 10 10:04:01 CET 2004


Update of /cvsroot/scummvm/scummvm/simon
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18455/simon

Modified Files:
	simon.cpp 
Log Message:
when calling SimonEngine::shutdown(), _itemheap_ptr and _tablesheap_ptr don't point to the beginning of the malloc'd buffer anymore. So use the offsets to do the free() call ; maybe it will fix the palmos issue.

Index: simon.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/simon/simon.cpp,v
retrieving revision 1.460
retrieving revision 1.461
diff -u -d -r1.460 -r1.461
--- simon.cpp	9 Nov 2004 16:43:45 -0000	1.460
+++ simon.cpp	10 Nov 2004 18:03:07 -0000	1.461
@@ -4738,12 +4738,8 @@
 
 	free(_stringtab_ptr);
 	free(_itemarray_ptr);
-#ifndef __PALM_OS__
-	// FIXME : These pointers may vary during the game.
-	// for these two calls i have an invalid chunk pointer error
-	free(_itemheap_ptr);
-	free(_tablesheap_ptr);
-#endif
+	free(_itemheap_ptr - _itemheap_curpos);
+	free(_tablesheap_ptr - _tablesheap_curpos);
 	midi.close();
 	_system->quit();
 }





More information about the Scummvm-git-logs mailing list