From 302c9f72fcf76cde76a3ee467b0fe5771a5faa3f Mon Sep 17 00:00:00 2001 From: Torbjörn Andersson Date: Sun, 28 Dec 2003 15:02:21 +0000 Subject: 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 --- sword1/control.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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])); -- cgit v1.2.3