aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorEugene Sandulenko2010-08-17 11:00:53 +0000
committerEugene Sandulenko2010-08-17 11:00:53 +0000
commit4d64004aa7897ca99299a6154c99e3ada350b9d3 (patch)
tree109fa8d0c42265745c5e6cebe1d3cf716367db89 /engines
parent2c545ae1f38e479f2df1d270170bc9708b93a824 (diff)
downloadscummvm-rg350-4d64004aa7897ca99299a6154c99e3ada350b9d3.tar.gz
scummvm-rg350-4d64004aa7897ca99299a6154c99e3ada350b9d3.tar.bz2
scummvm-rg350-4d64004aa7897ca99299a6154c99e3ada350b9d3.zip
KYRA: Fix array index out of bounds
svn-id: r52147
Diffstat (limited to 'engines')
-rw-r--r--engines/kyra/sound_towns.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/engines/kyra/sound_towns.cpp b/engines/kyra/sound_towns.cpp
index 750c6edfc2..02651102c2 100644
--- a/engines/kyra/sound_towns.cpp
+++ b/engines/kyra/sound_towns.cpp
@@ -592,7 +592,7 @@ int32 SoundTownsPC98_v2::voicePlay(const char *file, Audio::SoundHandle *handle,
int h = 0;
if (_currentSFX) {
- while (_mixer->isSoundHandleActive(_soundChannels[h]) && h < kNumChannelHandles)
+ while (h < kNumChannelHandles && _mixer->isSoundHandleActive(_soundChannels[h]))
h++;
if (h >= kNumChannelHandles)
return 0;