diff options
author | Torbjörn Andersson | 2008-10-20 04:39:10 +0000 |
---|---|---|
committer | Torbjörn Andersson | 2008-10-20 04:39:10 +0000 |
commit | 871375d4b518681e7782502c8f2df07bf85b27a5 (patch) | |
tree | 910001feac6cb6a83d9aaa5ae27b51b8b984cd12 | |
parent | f1a0d7dfb215708af1cc7fa6252c45b6ee5eca90 (diff) | |
download | scummvm-rg350-871375d4b518681e7782502c8f2df07bf85b27a5.tar.gz scummvm-rg350-871375d4b518681e7782502c8f2df07bf85b27a5.tar.bz2 scummvm-rg350-871375d4b518681e7782502c8f2df07bf85b27a5.zip |
I believe this fixes bug #2162345 ("BS1: Can't overwrite savegame"), but I'd
really appreciate it if someone would test it further, in case I missed
something. (Broken Sword 1 stores the names of the savegames in a separate file,
and that has to be in sync with the individual savegame files. In my experience,
that sort of thing can really attract bugs...)
svn-id: r34828
-rw-r--r-- | engines/sword1/control.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/engines/sword1/control.cpp b/engines/sword1/control.cpp index 2e283915fb..c566b6f1e2 100644 --- a/engines/sword1/control.cpp +++ b/engines/sword1/control.cpp @@ -703,7 +703,7 @@ void Control::handleSaveKey(Common::KeyState kbd) { bool Control::saveToFile(void) { if ((_selectedSavegame == 255) || !strlen((char*)_saveNames[_selectedSavegame])) return false; // no saveslot selected or no name entered - saveGameToFile(_numSaves); + saveGameToFile(_selectedSavegame); writeSavegameDescriptions(); return true; } @@ -737,8 +737,7 @@ void Control::readSavegameDescriptions(void) { _saveNames[curFileNum][pos++] = ch; } } while ((ch != 10) && (ch != 255) && (!inf->eos())); - if (_saveNames[curFileNum][0] != 0) - curFileNum++; + curFileNum++; } while ((ch != 255) && (!inf->eos())); _saveFiles = curFileNum; _numSaves = _saveFiles; |