diff options
Diffstat (limited to 'scumm/sound_he.cpp')
-rw-r--r-- | scumm/sound_he.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/scumm/sound_he.cpp b/scumm/sound_he.cpp index 18e4a3439f..560a4d5704 100644 --- a/scumm/sound_he.cpp +++ b/scumm/sound_he.cpp @@ -416,7 +416,7 @@ void Sound::playHESound(int soundID, int heOffset, int heChannel, int heFlags) { else if (READ_UINT32(ptr) == MKID('DIGI') || READ_UINT32(ptr) == MKID('TALK')) { byte *sndPtr = ptr; - priority = *(ptr + 18); + priority = (soundID > _vm->_numSounds) ? 255 : *(ptr + 18); rate = READ_LE_UINT16(ptr + 22); ptr += 8 + READ_BE_UINT32(ptr + 12); @@ -480,7 +480,7 @@ void Sound::playHESound(int soundID, int heOffset, int heChannel, int heFlags) { _currentMusic = soundID; _vm->_mixer->playRaw(NULL, sound, size, rate, flags, soundID); } - else { + else if (READ_UINT32(ptr) == MKID('MIDI')) { if (_vm->_musicEngine) { _vm->_musicEngine->startSound(soundID); } |