[Scummvm-cvs-logs] CVS: scummvm/sword1 control.cpp,1.7,1.8

Torbj?rn Andersson eriktorbjorn at users.sourceforge.net
Sun Dec 28 07:03:00 CET 2003


Update of /cvsroot/scummvm/scummvm/sword1
In directory sc8-pr-cvs1:/tmp/cvs-serv4421

Modified Files:
	control.cpp 
Log Message:
I believe this is the evil bug that's been corrupting my SAVEGAME.INF. (I
can't reproduce the problem under Windows though.)


Index: control.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/sword1/control.cpp,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- control.cpp	23 Dec 2003 17:34:23 -0000	1.7
+++ control.cpp	28 Dec 2003 15:02:21 -0000	1.8
@@ -440,7 +440,7 @@
 	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]));





More information about the Scummvm-git-logs mailing list