diff options
Diffstat (limited to 'engines')
-rw-r--r-- | engines/mohawk/riven_sound.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/engines/mohawk/riven_sound.cpp b/engines/mohawk/riven_sound.cpp index 36dbab67bb..20ba353863 100644 --- a/engines/mohawk/riven_sound.cpp +++ b/engines/mohawk/riven_sound.cpp @@ -150,7 +150,7 @@ void RivenSoundManager::addAmbientSounds(const SLSTRecord &record) { } void RivenSoundManager::setTargetVolumes(const SLSTRecord &record) { - for (uint i = 0; i < record.volumes.size(); i++) { + for (uint i = 0; i < MIN(_ambientSounds.sounds.size(), record.volumes.size()); i++) { _ambientSounds.sounds[i].targetVolume = record.volumes[i] * record.globalVolume / 256; _ambientSounds.sounds[i].targetBalance = record.balances[i]; } |