Do not decode frames beyond maxFrames to avoid any potential issues

svn-id: r28788
This commit is contained in:
Eugene Sandulenko 2007-09-01 15:03:44 +00:00
parent 7f08865ec5
commit 2d729927c5

View File

@ -829,8 +829,12 @@ int Anim::fillFrameOffsets(AnimationData *anim, bool reallyFill) {
readS._bigEndian = !_vm->isBigEndian(); // RLE has inversion BE<>LE
while (!readS.eos()) {
if (reallyFill && currentFrame <= anim->maxFrame)
if (reallyFill) {
anim->frameOffsets[currentFrame] = readS.pos();
if (currentFrame == anim->maxFrame)
break;
}
currentFrame++;
// For some strange reason, the animation header is in little