diff options
| author | Johannes Schickel | 2011-04-11 00:36:03 +0200 | 
|---|---|---|
| committer | Johannes Schickel | 2011-04-11 00:36:03 +0200 | 
| commit | d9441aeb802cd99cbef7f392301ff77e625a4f94 (patch) | |
| tree | 11a2bbab3b18777a702989b621b00e4521daa408 /engines | |
| parent | 073da68efa75045530afd201e8b82886326072a9 (diff) | |
| download | scummvm-rg350-d9441aeb802cd99cbef7f392301ff77e625a4f94.tar.gz scummvm-rg350-d9441aeb802cd99cbef7f392301ff77e625a4f94.tar.bz2 scummvm-rg350-d9441aeb802cd99cbef7f392301ff77e625a4f94.zip  | |
KYRA: Add some assertion to prevent out of bounds access.
Diffstat (limited to 'engines')
| -rw-r--r-- | engines/kyra/lol.cpp | 2 | 
1 files changed, 2 insertions, 0 deletions
diff --git a/engines/kyra/lol.cpp b/engines/kyra/lol.cpp index bec4879f36..5928c40f92 100644 --- a/engines/kyra/lol.cpp +++ b/engines/kyra/lol.cpp @@ -899,6 +899,8 @@ void LoLEngine::startupNew() {  	memset(_globalScriptVars2, 0x100, 8);  	static const int selectIds[] = { -9, -1, -8, -5 }; +	assert(_charSelection >= 0); +	assert(_charSelection < ARRAYSIZE(selectIds));  	addCharacter(selectIds[_charSelection]);  	gui_enableDefaultPlayfieldButtons();  | 
