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

dwatteau noreply at scummvm.org
Mon Apr 21 13:24:00 UTC 2025


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

Summary:
bbb5519655 SCUMM: Fix UBSan warning in canLoadGameStateCurrently() (e.g. with indy3-mac)
a3bff044fa SCUMM: Fix UBSan warning in writeVar() enhancement for SAMNMAX


Commit: bbb55196559db0de0223051c2655c9ef7d8a6206
    https://github.com/scummvm/scummvm/commit/bbb55196559db0de0223051c2655c9ef7d8a6206
Author: Donovan Watteau (contrib at dwatteau.fr)
Date: 2025-04-21T15:16:32+02:00

Commit Message:
SCUMM: Fix UBSan warning in canLoadGameStateCurrently() (e.g. with indy3-mac)

Changed paths:
    engines/scumm/saveload.cpp


diff --git a/engines/scumm/saveload.cpp b/engines/scumm/saveload.cpp
index e743bbb4550..5a77ae118f7 100644
--- a/engines/scumm/saveload.cpp
+++ b/engines/scumm/saveload.cpp
@@ -132,7 +132,7 @@ bool ScummEngine::canLoadGameStateCurrently(Common::U32String *msg) {
 		}
 
 		// Also deny persistence operations while the script opening the save menu is running...
-		isOriginalMenuActive = _currentRoom == saveRoom || vm.slot[_currentScript].number == saveMenuScript;
+		isOriginalMenuActive = _currentRoom == saveRoom || (_currentScript != 0xFF && vm.slot[_currentScript].number == saveMenuScript);
 	}
 
 	return (VAR_MAINMENU_KEY == 0xFF || VAR(VAR_MAINMENU_KEY) != 0) && !isOriginalMenuActive;


Commit: a3bff044fa5b8efe0fe8111831d4b1bc3ff40172
    https://github.com/scummvm/scummvm/commit/a3bff044fa5b8efe0fe8111831d4b1bc3ff40172
Author: Donovan Watteau (contrib at dwatteau.fr)
Date: 2025-04-21T15:16:32+02:00

Commit Message:
SCUMM: Fix UBSan warning in writeVar() enhancement for SAMNMAX

Changed paths:
    engines/scumm/script.cpp


diff --git a/engines/scumm/script.cpp b/engines/scumm/script.cpp
index 52dce02dda0..2d8c22d6c0d 100644
--- a/engines/scumm/script.cpp
+++ b/engines/scumm/script.cpp
@@ -755,7 +755,7 @@ void ScummEngine::writeVar(uint var, int value) {
 		// Any modifications here depend on knowing if the script will
 		// set the timer value back to something sensible afterwards.
 
-		if (_game.id == GID_SAMNMAX && vm.slot[_currentScript].number == 65 && var == VAR_TIMER_NEXT && enhancementEnabled(kEnhTimingChanges)) {
+		if (_game.id == GID_SAMNMAX && _currentScript != 0xFF && vm.slot[_currentScript].number == 65 && var == VAR_TIMER_NEXT && enhancementEnabled(kEnhTimingChanges)) {
 			// "Wirst Du brutzeln, wie eine grobe Bratwurst!"
 			if (value == 1 && _language == Common::DE_DEU)
 				value = 4;




More information about the Scummvm-git-logs mailing list