aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Kiewitz2016-02-09 19:20:57 +0100
committerMartin Kiewitz2016-02-09 19:20:57 +0100
commit142de4fffbf079c46ed7ce3339c0f93a4f1af624 (patch)
treedf6db97a586a86278a8afa7950fe66cb883157e4
parent587c1ad3106752e703197f8063bf03a0fb877561 (diff)
downloadscummvm-rg350-142de4fffbf079c46ed7ce3339c0f93a4f1af624.tar.gz
scummvm-rg350-142de4fffbf079c46ed7ce3339c0f93a4f1af624.tar.bz2
scummvm-rg350-142de4fffbf079c46ed7ce3339c0f93a4f1af624.zip
AGI: Fix skip auto-save slot code for auto-save
-rw-r--r--engines/agi/systemui.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/engines/agi/systemui.cpp b/engines/agi/systemui.cpp
index 42a35a8b33..72017a16bb 100644
--- a/engines/agi/systemui.cpp
+++ b/engines/agi/systemui.cpp
@@ -640,6 +640,9 @@ void SystemUI::readSavedGameSlots(bool filterNonexistant, bool withAutoSaveSlot)
void SystemUI::figureOutAutomaticSavedGameSlot(const char *automaticSaveDescription, int16 &matchedGameSlotId, int16 &freshGameSlotId) {
bool foundFresh = false;
+ matchedGameSlotId = -1;
+ freshGameSlotId = -1;
+
for (uint16 slotNr = 0; slotNr < _savedGameArray.size(); slotNr++) {
SystemUISavedGameEntry *savedGameEntry = &_savedGameArray[slotNr];
@@ -655,7 +658,7 @@ void SystemUI::figureOutAutomaticSavedGameSlot(const char *automaticSaveDescript
// no new slot found yet
if (!savedGameEntry->exists) {
// and current slot doesn't exist
- if (slotNr) {
+ if (savedGameEntry->slotId) {
// and slot is not the auto-save slot -> remember this slot
freshGameSlotId = savedGameEntry->slotId;
foundFresh = true;