gob - fix valgrind warning: invalid read when animKeysCount equals 0

svn-id: r44716
This commit is contained in:
Arnaud Boutonné 2009-10-06 19:57:17 +00:00
parent cbb4f05bf9
commit 7601f1b14f

View File

@ -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;
}