[Scummvm-cvs-logs] SF.net SVN: scummvm:[34828] scummvm/trunk/engines/sword1/control.cpp

eriktorbjorn at users.sourceforge.net eriktorbjorn at users.sourceforge.net
Mon Oct 20 06:39:10 CEST 2008


Revision: 34828
          http://scummvm.svn.sourceforge.net/scummvm/?rev=34828&view=rev
Author:   eriktorbjorn
Date:     2008-10-20 04:39:10 +0000 (Mon, 20 Oct 2008)

Log Message:
-----------
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...)

Modified Paths:
--------------
    scummvm/trunk/engines/sword1/control.cpp

Modified: scummvm/trunk/engines/sword1/control.cpp
===================================================================
--- scummvm/trunk/engines/sword1/control.cpp	2008-10-19 21:06:26 UTC (rev 34827)
+++ scummvm/trunk/engines/sword1/control.cpp	2008-10-20 04:39:10 UTC (rev 34828)
@@ -703,7 +703,7 @@
 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 @@
 						_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;


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.




More information about the Scummvm-git-logs mailing list