[Scummvm-git-logs] scummvm master -> 576d48afce46790ba960f46ea3a991b2dac9aff1

bluegr noreply at scummvm.org
Tue Aug 27 19:21:30 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:
576d48afce SCI: fix  bug no. 15336


Commit: 576d48afce46790ba960f46ea3a991b2dac9aff1
    https://github.com/scummvm/scummvm/commit/576d48afce46790ba960f46ea3a991b2dac9aff1
Author: athrxx (athrxx at scummvm.org)
Date: 2024-08-27T22:21:27+03:00

Commit Message:
SCI: fix  bug no. 15336

("SCI: KQ6: ScummVM closes when trying to load a game save")

The bug is caused by an assert I added for a special situation. Turns out
that the global pause counter can be > 1, since (like in this case here) the
scripts may already invoked several kDoSoundPause calls, before the
kRestoreGame() call happens.

Changed paths:
    engines/sci/sound/music.cpp


diff --git a/engines/sci/sound/music.cpp b/engines/sci/sound/music.cpp
index 8e2bc0add67..b7c693c5ad0 100644
--- a/engines/sci/sound/music.cpp
+++ b/engines/sci/sound/music.cpp
@@ -324,8 +324,11 @@ void SciMusic::resetGlobalPauseCounter() {
 	// do anything unpleasant afterwards, either). So this is not
 	// needed there.
 	// I have added an assert, since it is such a special case,
-	// people need to know what they're doing if they call this...
-	assert(_globalPause == 1);
+	// people need to know what they're doing if they call this.
+	// The value can be greater than 1, since the scripts may
+	// already have increased it, before the kRestoreGame() call
+	// happens.
+	assert(_globalPause >= 1);
 	_globalPause = 0;
 }
 




More information about the Scummvm-git-logs mailing list