From 499886f89e6e05e06e99f9e744c0dd44ecf7581b Mon Sep 17 00:00:00 2001 From: Kim Kulling Date: Sat, 5 Nov 2016 18:41:19 +0100 Subject: [PATCH] ScenePreprocessor: fix invalid index counter. --- code/ScenePreprocessor.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/code/ScenePreprocessor.cpp b/code/ScenePreprocessor.cpp index a38a9430e..327da0b35 100644 --- a/code/ScenePreprocessor.cpp +++ b/code/ScenePreprocessor.cpp @@ -176,22 +176,22 @@ void ScenePreprocessor::ProcessAnimation (aiAnimation* anim) if (anim->mDuration == -1.) { // Position keys - for (unsigned int i = 0; i < channel->mNumPositionKeys;++i) { - aiVectorKey& key = channel->mPositionKeys[i]; + for (unsigned int j = 0; j < channel->mNumPositionKeys;++j) { + aiVectorKey& key = channel->mPositionKeys[j]; first = std::min (first, key.mTime); last = std::max (last, key.mTime); } // Scaling keys - for (unsigned int i = 0; i < channel->mNumScalingKeys;++i) { - aiVectorKey& key = channel->mScalingKeys[i]; + for (unsigned int j = 0; j < channel->mNumScalingKeys;++j ) { + aiVectorKey& key = channel->mScalingKeys[j]; first = std::min (first, key.mTime); last = std::max (last, key.mTime); } // Rotation keys - for (unsigned int i = 0; i < channel->mNumRotationKeys;++i) { - aiQuatKey& key = channel->mRotationKeys[i]; + for (unsigned int j = 0; j < channel->mNumRotationKeys;++j ) { + aiQuatKey& key = channel->mRotationKeys[ j ]; first = std::min (first, key.mTime); last = std::max (last, key.mTime); }