diff options
| author | Strangerke | 2019-09-06 22:25:33 +0200 | 
|---|---|---|
| committer | Strangerke | 2019-09-06 22:25:33 +0200 | 
| commit | 555cd7d33e5e2a9c457032ede67b6be3c62aeb92 (patch) | |
| tree | 6077854997a1a55666d8b3aa66848c430b13f8df | |
| parent | cf001b11164802d26e470f98b6391d3da63f6f2b (diff) | |
| download | scummvm-rg350-555cd7d33e5e2a9c457032ede67b6be3c62aeb92.tar.gz scummvm-rg350-555cd7d33e5e2a9c457032ede67b6be3c62aeb92.tar.bz2 scummvm-rg350-555cd7d33e5e2a9c457032ede67b6be3c62aeb92.zip  | |
HDB: Fix potential out of bound
| -rw-r--r-- | engines/hdb/sound.cpp | 2 | 
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;  | 
