From 555cd7d33e5e2a9c457032ede67b6be3c62aeb92 Mon Sep 17 00:00:00 2001 From: Strangerke Date: Fri, 6 Sep 2019 22:25:33 +0200 Subject: HDB: Fix potential out of bound --- engines/hdb/sound.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'engines/hdb') 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; -- cgit v1.2.3