Skip to content

Commit

Permalink
MOHAWK: Fix incorrect loop in sound manager
Browse files Browse the repository at this point in the history
  • Loading branch information
bgK authored and sev- committed Jul 3, 2017
1 parent 006dcf6 commit 39b0d53
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion engines/mohawk/riven_sound.cpp
Expand Up @@ -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];
}
Expand Down

0 comments on commit 39b0d53

Please sign in to comment.