From 695667d93432dbf34c7dbd3a344eb4f031e00933 Mon Sep 17 00:00:00 2001 From: Gregory Montoir Date: Wed, 10 Nov 2004 18:03:07 +0000 Subject: 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. svn-id: r15780 --- simon/simon.cpp | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'simon') diff --git a/simon/simon.cpp b/simon/simon.cpp index fb78d4bfa4..b7519e8ca4 100644 --- a/simon/simon.cpp +++ b/simon/simon.cpp @@ -4738,12 +4738,8 @@ void SimonEngine::shutdown() { 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(); } -- cgit v1.2.3