diff options
author | Filippos Karapetis | 2010-06-06 23:00:33 +0000 |
---|---|---|
committer | Filippos Karapetis | 2010-06-06 23:00:33 +0000 |
commit | 3c82b6578fa3bd4b3d91c1933dd390581dbe08d1 (patch) | |
tree | 580cdb0adf071e07d1212009c4a6bc64dedb7710 /engines/sci/engine/savegame.cpp | |
parent | 51a897845532cc1fe587352726051e5f420d5d68 (diff) | |
download | scummvm-rg350-3c82b6578fa3bd4b3d91c1933dd390581dbe08d1.tar.gz scummvm-rg350-3c82b6578fa3bd4b3d91c1933dd390581dbe08d1.tar.bz2 scummvm-rg350-3c82b6578fa3bd4b3d91c1933dd390581dbe08d1.zip |
Now that EngineState is not deleted when loading games, we can move some more state-related variables to it, and remove several FIXME's about non-const global variables. Also, the entries in the data stack are now deleted when loading (fixes a memory leak - thanks to digitall for this).
svn-id: r49465
Diffstat (limited to 'engines/sci/engine/savegame.cpp')
-rw-r--r-- | engines/sci/engine/savegame.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/engines/sci/engine/savegame.cpp b/engines/sci/engine/savegame.cpp index 798f889460..9bf23dedf5 100644 --- a/engines/sci/engine/savegame.cpp +++ b/engines/sci/engine/savegame.cpp @@ -615,7 +615,7 @@ void DynMem::saveLoadWithSerializer(Common::Serializer &s) { void DataStack::saveLoadWithSerializer(Common::Serializer &s) { s.syncAsUint32LE(_capacity); if (s.isLoading()) { - //free(entries); + free(_entries); _entries = (reg_t *)calloc(_capacity, sizeof(reg_t)); } } @@ -915,7 +915,7 @@ void gamestate_restore(EngineState *s, Common::SeekableReadStream *fh) { s->restoring = true; - script_abort_flag = 2; // Abort current game with replay + s->script_abort_flag = 2; // Abort current game with replay s->shrinkStackToBase(); } |