[Scummvm-git-logs] scummvm master -> 8f56a31b7fc1a81535a49c18eb3840cea1b44de0
AndywinXp
noreply at scummvm.org
Fri Nov 17 09:07:42 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:
8f56a31b7f SCUMM: HE/SOUND: Add missing check to PlayVoice()
Commit: 8f56a31b7fc1a81535a49c18eb3840cea1b44de0
https://github.com/scummvm/scummvm/commit/8f56a31b7fc1a81535a49c18eb3840cea1b44de0
Author: AndywinXp (andywinxp at gmail.com)
Date: 2023-11-17T10:07:33+01:00
Commit Message:
SCUMM: HE/SOUND: Add missing check to PlayVoice()
This avoids attempting to play 0 length files at offset 0.
Changed paths:
engines/scumm/he/sound_he.cpp
diff --git a/engines/scumm/he/sound_he.cpp b/engines/scumm/he/sound_he.cpp
index e913f610256..6b8dd299824 100644
--- a/engines/scumm/he/sound_he.cpp
+++ b/engines/scumm/he/sound_he.cpp
@@ -1494,6 +1494,11 @@ void SoundHE::playVoice(uint32 offset, uint32 length) {
byte *ptr;
int talkieChannel = (_vm->VAR_TALK_CHANNEL != 0xFF) ? _vm->VAR(_vm->VAR_TALK_CHANNEL) : 0;
+ if (offset == 0 || length == 0) {
+ debug(5, "SoundHE::playVoice(): Attempted playing 0 offset/length talkie from scripts, bailing out...");
+ return;
+ }
+
if (ConfMan.getBool("speech_mute"))
return;
More information about the Scummvm-git-logs
mailing list