diff options
-rw-r--r-- | engines/saga/animation.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/engines/saga/animation.cpp b/engines/saga/animation.cpp index 4dd24cb422..64e8b0a9c1 100644 --- a/engines/saga/animation.cpp +++ b/engines/saga/animation.cpp @@ -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 |