[Scummvm-git-logs] scummvm master -> bbb1d94dbf2aae30381b3f357458715e810f58cc

bluegr noreply at scummvm.org
Thu Apr 30 22:14:59 UTC 2026


This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://api.github.com/repos/scummvm/scummvm .

Summary:
bbb1d94dbf NANCY: Check if the correct save slot exists in the Nancy8+ save dialog


Commit: bbb1d94dbf2aae30381b3f357458715e810f58cc
    https://github.com/scummvm/scummvm/commit/bbb1d94dbf2aae30381b3f357458715e810f58cc
Author: Filippos Karapetis (bluegr at gmail.com)
Date: 2026-05-01T01:14:37+03:00

Commit Message:
NANCY: Check if the correct save slot exists in the Nancy8+ save dialog

Fix #16681

Changed paths:
    engines/nancy/state/loadsave.cpp


diff --git a/engines/nancy/state/loadsave.cpp b/engines/nancy/state/loadsave.cpp
index 1dadf1221fe..5ffde9de8ae 100644
--- a/engines/nancy/state/loadsave.cpp
+++ b/engines/nancy/state/loadsave.cpp
@@ -207,7 +207,8 @@ bool LoadSaveMenu::save() {
 	if (sdlg && sdlg->dialogs.size() > 1) {
 		// nancy6 added a "Do you want to overwrite this save" dialog.
 		// First, check if we are actually overwriting
-		SaveStateDescriptor desc = g_nancy->getMetaEngine()->querySaveMetaInfos(ConfMan.getActiveDomainName().c_str(), _selectedSave + 1);
+		int slot = (g_nancy->getGameType() <= kGameTypeNancy7) ? _selectedSave + 1 : _selectedSave;
+		SaveStateDescriptor desc = g_nancy->getMetaEngine()->querySaveMetaInfos(ConfMan.getActiveDomainName().c_str(), slot);
 		if (desc.isValid()) {
 			if (!ConfMan.hasKey("sdlg_return", Common::ConfigManager::kTransientDomain)) {
 				// Request the dialog
@@ -1175,10 +1176,6 @@ void LoadSaveMenu_V2::enterFilename() {
 }
 
 bool LoadSaveMenu_V2::save() {
-	if (!LoadSaveMenu::save()) {
-		return false;
-	}
-
 	Common::String finalDesc = _enteredString;
 
 	// Look for a state with a matching name and overwrite it
@@ -1207,6 +1204,10 @@ bool LoadSaveMenu_V2::save() {
 		} while (shouldContinue);
 	}
 
+	if (!LoadSaveMenu::save()) {
+		return false;
+	}
+
 	g_nancy->saveGameState(_selectedSave, finalDesc, false);
 
 	ConfMan.setInt("display_slot", _selectedSave, Common::ConfigManager::kTransientDomain); // Used to load the save name




More information about the Scummvm-git-logs mailing list