diff options
author | Nicola Mettifogo | 2007-10-19 21:26:05 +0000 |
---|---|---|
committer | Nicola Mettifogo | 2007-10-19 21:26:05 +0000 |
commit | e45f4c25afb4eed8b1b44fc201dae7833125cb1d (patch) | |
tree | 0b7b9ffb31c63efb4bb607fe71e3458ecb7f2374 /engines/parallaction/saveload.cpp | |
parent | ef14311c99ceab8680aae8faa7bcf4fc59cbdf2d (diff) | |
download | scummvm-rg350-e45f4c25afb4eed8b1b44fc201dae7833125cb1d.tar.gz scummvm-rg350-e45f4c25afb4eed8b1b44fc201dae7833125cb1d.tar.bz2 scummvm-rg350-e45f4c25afb4eed8b1b44fc201dae7833125cb1d.zip |
Fixed loadgame bug: old game state wasn't fully wiped out before loading, thus creating bogus game states in memory. As a result, most savefiles should be ditched. A savefile is sure to be safe if it was *never* loaded from in-game, but nothing can be said in the opposite case.
svn-id: r29231
Diffstat (limited to 'engines/parallaction/saveload.cpp')
-rw-r--r-- | engines/parallaction/saveload.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/engines/parallaction/saveload.cpp b/engines/parallaction/saveload.cpp index 84c376cd8f..4258d4ba41 100644 --- a/engines/parallaction/saveload.cpp +++ b/engines/parallaction/saveload.cpp @@ -123,6 +123,8 @@ void Parallaction_ns::doLoadGame(uint16 slot) { _engineFlags &= ~kEngineQuit; _numLocations = atoi(s); + memset(_localFlags, 0, sizeof(_localFlags)); + memset(_locationNames, 0, sizeof(_locationNames)); uint16 _si; for (_si = 0; _si < _numLocations; _si++) { @@ -134,7 +136,6 @@ void Parallaction_ns::doLoadGame(uint16 slot) { f->readLine(s, 15); _localFlags[_si] = atoi(s); } - _locationNames[_si][0] = '\0'; cleanInventory(false); ItemName name; |