aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorathrxx2013-04-17 21:34:26 +0200
committerathrxx2013-04-18 16:10:49 +0200
commit3ac156422e09341f2acfba352a06c9629b6e0b20 (patch)
treecd54565567c56326ab1b342b61dd81abd343a668 /engines
parent2bdfa47ec0ad4d35e99789698838317380834229 (diff)
downloadscummvm-rg350-3ac156422e09341f2acfba352a06c9629b6e0b20.tar.gz
scummvm-rg350-3ac156422e09341f2acfba352a06c9629b6e0b20.tar.bz2
scummvm-rg350-3ac156422e09341f2acfba352a06c9629b6e0b20.zip
KYRA: (LOL) - fix warning about possible out of bounds access in lol.cpp
Diffstat (limited to 'engines')
-rw-r--r--engines/kyra/lol.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/engines/kyra/lol.cpp b/engines/kyra/lol.cpp
index f7696d45b5..3af65d9b7a 100644
--- a/engines/kyra/lol.cpp
+++ b/engines/kyra/lol.cpp
@@ -1363,7 +1363,7 @@ void LoLEngine::setCharacterMagicOrHitPoints(int charNum, int type, int points,
{ 0x21, 0xAA, 0x99, 0x00, 0x4253 }
};
- if (charNum > 3)
+ if (charNum > 2)
return;
LoLCharacter *c = &_characters[charNum];
@@ -1851,7 +1851,7 @@ int LoLEngine::playCharacterScriptChat(int charId, int mode, int restorePortrait
} else if (charId > 0) {
int i = 0;
- for (; i < 4; i++) {
+ for (; i < 3; i++) {
if (_characters[i].id != charId || !(_characters[i].flags & 1))
continue;
if (charId == ch)