aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTorbjörn Andersson2003-12-28 15:02:21 +0000
committerTorbjörn Andersson2003-12-28 15:02:21 +0000
commit302c9f72fcf76cde76a3ee467b0fe5771a5faa3f (patch)
treeacc236c9559bba98c38792756ecce718eb476088
parentdb5a2ba1c8ee7ec43f80aa24a60b3a9fe2afd4d7 (diff)
downloadscummvm-rg350-302c9f72fcf76cde76a3ee467b0fe5771a5faa3f.tar.gz
scummvm-rg350-302c9f72fcf76cde76a3ee467b0fe5771a5faa3f.tar.bz2
scummvm-rg350-302c9f72fcf76cde76a3ee467b0fe5771a5faa3f.zip
I believe this is the evil bug that's been corrupting my SAVEGAME.INF. (I
can't reproduce the problem under Windows though.) svn-id: r11996
-rw-r--r--sword1/control.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/sword1/control.cpp b/sword1/control.cpp
index de2cad84b7..0b17e597b4 100644
--- a/sword1/control.cpp
+++ b/sword1/control.cpp
@@ -440,7 +440,7 @@ void SwordControl::writeSavegameDescriptions(void) {
outf = mgr->open_savefile("SAVEGAME.INF", _savePath, SAVEFILE_WRITE);
// if the player accidently clicked the last slot and then deselected it again,
// we'd still have _saveFiles == 64, so get rid of the empty end.
- while (strlen(_saveNames[_saveFiles] - 1) == 0)
+ while (strlen(_saveNames[_saveFiles - 1]) == 0)
_saveFiles--;
for (uint8 cnt = 0; cnt < _saveFiles; cnt++) {
outf->write(_saveNames[cnt], strlen(_saveNames[cnt]));