diff --git a/components/nifogre/controller.hpp b/components/nifogre/controller.hpp index f4d7ac29f..aa60482e3 100644 --- a/components/nifogre/controller.hpp +++ b/components/nifogre/controller.hpp @@ -35,7 +35,7 @@ namespace NifOgre return aLastKey->mValue + ((aKey->mValue - aLastKey->mValue) * a); } else - return (--keys.end())->second.mValue; + return keys.rbegin()->second.mValue; } Ogre::Vector3 interpKey(const Nif::Vector3KeyMap::MapType &keys, float time) const @@ -59,7 +59,7 @@ namespace NifOgre return aLastKey->mValue + ((aKey->mValue - aLastKey->mValue) * a); } else - return (--keys.end())->second.mValue; + return keys.rbegin()->second.mValue; } }; diff --git a/components/nifogre/ogrenifloader.cpp b/components/nifogre/ogrenifloader.cpp index 531044c26..910b8b352 100644 --- a/components/nifogre/ogrenifloader.cpp +++ b/components/nifogre/ogrenifloader.cpp @@ -437,7 +437,7 @@ public: return Ogre::Quaternion::nlerp(a, aLastKey->mValue, aKey->mValue); } else - return (--keys.end())->second.mValue; + return keys.rbegin()->second.mValue; } public: