diff options
author | Gregory Montoir | 2004-11-10 18:03:07 +0000 |
---|---|---|
committer | Gregory Montoir | 2004-11-10 18:03:07 +0000 |
commit | 695667d93432dbf34c7dbd3a344eb4f031e00933 (patch) | |
tree | a813755011d84f155420d19b597986a7a9c0830a /simon | |
parent | 20d12a515e077bcdd9b6d38ee229b05c10341d1f (diff) | |
download | scummvm-rg350-695667d93432dbf34c7dbd3a344eb4f031e00933.tar.gz scummvm-rg350-695667d93432dbf34c7dbd3a344eb4f031e00933.tar.bz2 scummvm-rg350-695667d93432dbf34c7dbd3a344eb4f031e00933.zip |
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
Diffstat (limited to 'simon')
-rw-r--r-- | simon/simon.cpp | 8 |
1 files changed, 2 insertions, 6 deletions
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(); } |