aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorArnaud Boutonné2009-10-06 19:57:17 +0000
committerArnaud Boutonné2009-10-06 19:57:17 +0000
commit7601f1b14fadb108f99557ca5c90a481a7efe0e0 (patch)
tree183d2568480ad5c95d4d56d86e0b9f4c78fad404 /engines
parentcbb4f05bf9694818f24f7169e4d54a46b277c02b (diff)
downloadscummvm-rg350-7601f1b14fadb108f99557ca5c90a481a7efe0e0.tar.gz
scummvm-rg350-7601f1b14fadb108f99557ca5c90a481a7efe0e0.tar.bz2
scummvm-rg350-7601f1b14fadb108f99557ca5c90a481a7efe0e0.zip
gob - fix valgrind warning: invalid read when animKeysCount equals 0
svn-id: r44716
Diffstat (limited to 'engines')
-rw-r--r--engines/gob/mult_v2.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/engines/gob/mult_v2.cpp b/engines/gob/mult_v2.cpp
index bad4723159..88b604023c 100644
--- a/engines/gob/mult_v2.cpp
+++ b/engines/gob/mult_v2.cpp
@@ -651,7 +651,7 @@ void Mult_v2::drawAnims(bool &stop) {
for (int i = 0; i < 4; i++) {
int16 animKeysCount = _multData->animKeysCount[i];
- if (_multData->animKeys[i][animKeysCount - 1].frame > _frame)
+ if ((animKeysCount > 0) && ((uint16) _multData->animKeys[i][animKeysCount - 1].frame > _frame))
stop = false;
}