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

OMGPizzaGuy noreply at scummvm.org
Sat Jan 21 05:26:11 UTC 2023


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:
a48539379a ULTIMA8: Check "lastSave" setting exists before using as save slot.


Commit: a48539379aa011655b5f37edd75f4664cd3b5c92
    https://github.com/scummvm/scummvm/commit/a48539379aa011655b5f37edd75f4664cd3b5c92
Author: Matthew Jimenez (matthew.jimenez at outlook.com)
Date: 2023-01-20T23:25:55-06:00

Commit Message:
ULTIMA8: Check "lastSave" setting exists before using as save slot.
This was forcing slot zero when even if no saves exist, causing an error on load

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


diff --git a/engines/ultima/ultima8/ultima8.cpp b/engines/ultima/ultima8/ultima8.cpp
index 949d527c6ab..78a87c2cf0f 100644
--- a/engines/ultima/ultima8/ultima8.cpp
+++ b/engines/ultima/ultima8/ultima8.cpp
@@ -524,7 +524,7 @@ Common::Error Ultima8Engine::startupGame() {
 		_audioMixer->openMidiOutput();
 
 	int saveSlot = ConfMan.hasKey("save_slot") ? ConfMan.getInt("save_slot") : -1;
-	if (saveSlot == -1)
+	if (saveSlot == -1 && ConfMan.hasKey("lastSave"))
 		saveSlot = ConfMan.getInt("lastSave");
 
 	newGame(saveSlot);




More information about the Scummvm-git-logs mailing list