[Scummvm-git-logs] scummvm master -> 7c8adb00f3b157f315146284f6213f826da98b0f
athrxx
athrxx at scummvm.org
Tue Nov 9 20:22:06 UTC 2021
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:
7c8adb00f3 KYRA: (LoK/Mac) - minor sound driver fix
Commit: 7c8adb00f3b157f315146284f6213f826da98b0f
https://github.com/scummvm/scummvm/commit/7c8adb00f3b157f315146284f6213f826da98b0f
Author: athrxx (athrxx at scummvm.org)
Date: 2021-11-09T21:21:14+01:00
Commit Message:
KYRA: (LoK/Mac) - minor sound driver fix
(unused feature AFAIK)
Changed paths:
engines/kyra/sound/drivers/halestorm.cpp
diff --git a/engines/kyra/sound/drivers/halestorm.cpp b/engines/kyra/sound/drivers/halestorm.cpp
index 2fd464b4a9..94f2e7eea3 100644
--- a/engines/kyra/sound/drivers/halestorm.cpp
+++ b/engines/kyra/sound/drivers/halestorm.cpp
@@ -1570,11 +1570,14 @@ void HSLowLevelDriver::midiNoteOnOff(MidiTrackState *s, uint8 chan, uint8 note,
const uint8 *pos = _songData.ptr + 16;
int cnt = READ_BE_UINT16(pos);
pos += 2;
- while (cnt) {
- if (READ_BE_UINT16(pos) == prg)
+ assert(18 + cnt * 4 <= _songData.len);
+
+ while (cnt--) {
+ if (READ_BE_UINT16(pos) == prg) {
+ prg = READ_BE_UINT16(pos + 2);
break;
- pos += 2;
- --cnt;
+ }
+ pos += 4;
}
if (note + _song_transpose > 0)
More information about the Scummvm-git-logs
mailing list