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

eriktorbjorn at users.sourceforge.net eriktorbjorn at users.sourceforge.net
Fri Apr 21 03:25:35 CEST 2006


Revision: 22069
Author:   eriktorbjorn
Date:     2006-04-21 03:24:22 -0700 (Fri, 21 Apr 2006)
ViewCVS:  http://svn.sourceforge.net/scummvm/?rev=22069&view=rev

Log Message:
-----------
Fixed silly bug in --save-slot handling: Don't try to restore a savegame unless
the specified save slot is > 0. (The default value is -1, which shouldn't be
restored either.)

I thought I had fixed that already, but I guess I made a last-minute change...

Modified Paths:
--------------
    scummvm/trunk/engines/sword1/sword1.cpp
Modified: scummvm/trunk/engines/sword1/sword1.cpp
===================================================================
--- scummvm/trunk/engines/sword1/sword1.cpp	2006-04-21 07:42:40 UTC (rev 22068)
+++ scummvm/trunk/engines/sword1/sword1.cpp	2006-04-21 10:24:22 UTC (rev 22069)
@@ -450,7 +450,9 @@
 		_logic->startPositions(startPos);
 	} else {
 		int saveSlot = ConfMan.getInt("save_slot");
-		if (_control->restoreGameFromFile(saveSlot - 1)) {
+		// Savegames are numbered starting from 1 in the dialog window,
+		// but their filenames are numbered starting from 0.
+		if (saveSlot > 0 && _control->restoreGameFromFile(saveSlot - 1)) {
 			_control->doRestore();
 		} else if (_control->savegamesExist()) {
 			_systemVars.controlPanelMode = CP_NEWGAME;


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