[Scummvm-git-logs] scummvm master -> 4ca24fd8ce0ed4b2a72f8d81d764e635f7f968ff

AndywinXp noreply at scummvm.org
Sun Aug 11 16:59:42 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:
4ca24fd8ce SCUMM: Fix illegal variable access


Commit: 4ca24fd8ce0ed4b2a72f8d81d764e635f7f968ff
    https://github.com/scummvm/scummvm/commit/4ca24fd8ce0ed4b2a72f8d81d764e635f7f968ff
Author: AndywinXp (andywinxp at gmail.com)
Date: 2024-08-11T18:59:37+02:00

Commit Message:
SCUMM: Fix illegal variable access

Changed paths:
    engines/scumm/saveload.cpp


diff --git a/engines/scumm/saveload.cpp b/engines/scumm/saveload.cpp
index 6d7c829fe05..478f01720b7 100644
--- a/engines/scumm/saveload.cpp
+++ b/engines/scumm/saveload.cpp
@@ -1950,7 +1950,7 @@ void ScummEngine::saveLoadWithSerializer(Common::Serializer &s) {
 
 	s.syncArray(_roomVars, _numRoomVariables, Common::Serializer::Sint32LE, VER(38));
 
-	int currentSoundCard = VAR(VAR_SOUNDCARD);
+	int currentSoundCard = VAR_SOUNDCARD != 0xFF ? VAR(VAR_SOUNDCARD) : -1;
 
 	// The variables grew from 16 to 32 bit.
 	if (s.getVersion() < VER(15))




More information about the Scummvm-git-logs mailing list