aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--engines/draci/animation.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/engines/draci/animation.cpp b/engines/draci/animation.cpp
index 746d577d3a..e3f87feb8b 100644
--- a/engines/draci/animation.cpp
+++ b/engines/draci/animation.cpp
@@ -515,8 +515,8 @@ void AnimationManager::deleteAnimation(int id) {
// Iterate the second time to decrease indexes greater than the deleted animation index
for (it = _animations.begin(); it != _animations.end(); ++it) {
- if ((*it)->getIndex() == index && (*it)->getIndex() != kIgnoreIndex) {
- (*it)->setIndex(index-1);
+ if ((*it)->getIndex() > index && (*it)->getIndex() != kIgnoreIndex) {
+ (*it)->setIndex((*it)->getIndex() - 1);
}
}