aboutsummaryrefslogtreecommitdiff
path: root/engines/saga
diff options
context:
space:
mode:
Diffstat (limited to 'engines/saga')
-rw-r--r--engines/saga/animation.h8
1 files changed, 3 insertions, 5 deletions
diff --git a/engines/saga/animation.h b/engines/saga/animation.h
index a88d743af1..d688b0f0a7 100644
--- a/engines/saga/animation.h
+++ b/engines/saga/animation.h
@@ -166,11 +166,9 @@ private:
if (animId >= MAX_ANIMATIONS) {
if (animId >= MAX_ANIMATIONS + ARRAYSIZE(_cutawayAnimations))
error("validateAnimationId: animId out of range");
- if (_cutawayAnimations[animId - MAX_ANIMATIONS] == NULL) {
+ if (_cutawayAnimations[animId - MAX_ANIMATIONS] == NULL)
error("validateAnimationId: animId=%i unassigned", animId);
- }
- }
- if (_animations[animId] == NULL) {
+ } else if (_animations[animId] == NULL) {
error("validateAnimationId: animId=%i unassigned.", animId);
}
}
@@ -184,7 +182,7 @@ private:
AnimationData* getAnimation(uint16 animId) {
validateAnimationId(animId);
- if (animId > MAX_ANIMATIONS)
+ if (animId >= MAX_ANIMATIONS)
return _cutawayAnimations[animId - MAX_ANIMATIONS];
return _animations[animId];
}