diff options
author | Torbjörn Andersson | 2006-04-21 10:24:22 +0000 |
---|---|---|
committer | Torbjörn Andersson | 2006-04-21 10:24:22 +0000 |
commit | 8740bc01340787d4b8af1fd84f9827cef3105b43 (patch) | |
tree | bcbd5be00834b341d2f26a6dca69542fd9affe38 | |
parent | 9bcdecec2849a132418284638fd520f3e16d74f8 (diff) | |
download | scummvm-rg350-8740bc01340787d4b8af1fd84f9827cef3105b43.tar.gz scummvm-rg350-8740bc01340787d4b8af1fd84f9827cef3105b43.tar.bz2 scummvm-rg350-8740bc01340787d4b8af1fd84f9827cef3105b43.zip |
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...
svn-id: r22069
-rw-r--r-- | engines/sword1/sword1.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/engines/sword1/sword1.cpp b/engines/sword1/sword1.cpp index 0d610d5251..cba1e97bb8 100644 --- a/engines/sword1/sword1.cpp +++ b/engines/sword1/sword1.cpp @@ -450,7 +450,9 @@ int SwordEngine::go() { _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; |