aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--engines/hdb/sound.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/engines/hdb/sound.cpp b/engines/hdb/sound.cpp
index 404e0deebc..f9d8e5f3bc 100644
--- a/engines/hdb/sound.cpp
+++ b/engines/hdb/sound.cpp
@@ -1443,7 +1443,7 @@ void Sound::init() {
}
debug(9, "Registering sound: sName: %s, \tsLuaName: %s, \tExtension: %s", soundList[index].name, soundList[index].luaName, _soundCache[index].ext == SNDTYPE_MP3 ? "MP3" : "WAV");
index++;
- if (index > kMaxSounds)
+ if (index >= kMaxSounds)
error("Reached MAX_SOUNDS in Sound::Init() !");
}
_numSounds = index;