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

OMGPizzaGuy noreply at scummvm.org
Sat Aug 3 20:25:27 UTC 2024


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

Summary:
bc0bf79745 ULTIMA8:  Fix last save load failure.


Commit: bc0bf7974582ee86d329d65ff4d32531d5ac66a1
    https://github.com/scummvm/scummvm/commit/bc0bf7974582ee86d329d65ff4d32531d5ac66a1
Author: Matthew Jimenez (matthew.jimenez at outlook.com)
Date: 2024-08-03T15:25:07-05:00

Commit Message:
ULTIMA8:  Fix last save load failure.
Setting to empty string acts as 0 and then breaks when no saves are present.

Changed paths:
    engines/ultima/ultima8/ultima8.cpp


diff --git a/engines/ultima/ultima8/ultima8.cpp b/engines/ultima/ultima8/ultima8.cpp
index c0e1b54517b..d9c2c75ab55 100644
--- a/engines/ultima/ultima8/ultima8.cpp
+++ b/engines/ultima/ultima8/ultima8.cpp
@@ -920,7 +920,7 @@ Common::Error Ultima8Engine::loadGameState(int slot) {
 	if (result.getCode() == Common::kNoError)
 		ConfMan.setInt("lastSave", slot);
 	else
-		ConfMan.set("lastSave", "");
+		ConfMan.setInt("lastSave", -1);
 
 	ConfMan.flushToDisk();
 
@@ -934,7 +934,7 @@ Common::Error Ultima8Engine::saveGameState(int slot, const Common::String &desc,
 		if (result.getCode() == Common::kNoError)
 			ConfMan.setInt("lastSave", slot);
 		else
-			ConfMan.set("lastSave", "");
+			ConfMan.setInt("lastSave", -1);
 	}
 
 	ConfMan.flushToDisk();
@@ -1136,7 +1136,7 @@ bool Ultima8Engine::newGame(int saveSlot) {
 	_game->startInitialUsecode(saveSlot);
 
 	if (saveSlot == -1)
-		ConfMan.set("lastSave", "");
+		ConfMan.setInt("lastSave", -1);
 
 	return true;
 }




More information about the Scummvm-git-logs mailing list