aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorathrxx2013-04-15 21:54:00 +0200
committerathrxx2013-04-18 16:10:42 +0200
commit06962db454c0a73087a06511b70accc69053bba8 (patch)
treebffd69444b569b7131a163dd2162037eebbcb3e2 /engines
parentd3419f6a313e7ba214c88da1fad48d36d4423aba (diff)
downloadscummvm-rg350-06962db454c0a73087a06511b70accc69053bba8.tar.gz
scummvm-rg350-06962db454c0a73087a06511b70accc69053bba8.tar.bz2
scummvm-rg350-06962db454c0a73087a06511b70accc69053bba8.zip
KYRA: (HOF) - fix possible out of bounds array access
Diffstat (limited to 'engines')
-rw-r--r--engines/kyra/sequences_hof.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/engines/kyra/sequences_hof.cpp b/engines/kyra/sequences_hof.cpp
index e70bbca88b..a4294cbc37 100644
--- a/engines/kyra/sequences_hof.cpp
+++ b/engines/kyra/sequences_hof.cpp
@@ -1041,7 +1041,8 @@ void SeqPlayer_HOF::playDialogueAnimation(uint16 strID, uint16 soundID, int text
int dur = int(strlen(_sequenceStrings[strID])) * (_vm->gameFlags().isTalkie ? 7 : 15);
if (_vm->textEnabled()) {
int slot = displaySubTitle(strID, textPosX, textPosY, dur, textWidth);
- _textSlots[slot].textcolor = textColor;
+ if (slot >= 0)
+ _textSlots[slot].textcolor = textColor;
}
_specialAnimTimeOutTotal = _system->getMillis() + dur * _vm->tickLength();
int curframe = animStartFrame;