summaryrefslogtreecommitdiff
path: root/indra/llcharacter/llmotion.cpp
diff options
context:
space:
mode:
authorGlenn Glazer <coyot@lindenlab.com>2015-10-01 09:02:45 -0700
committerGlenn Glazer <coyot@lindenlab.com>2015-10-01 09:02:45 -0700
commitd3928405e3498fabd9215da96fcd0d72e71e83e1 (patch)
tree218b97ae3d0173a9b8c106c09306aef03f42c7f6 /indra/llcharacter/llmotion.cpp
parentc1e3f778cb377999edf49764088f3f23a2302afc (diff)
parent6c422a881499c0d7649a59db47905a584bbd2bc1 (diff)
merge, close develop branch
--HG-- branch : develop
Diffstat (limited to 'indra/llcharacter/llmotion.cpp')
-rwxr-xr-xindra/llcharacter/llmotion.cpp11
1 files changed, 8 insertions, 3 deletions
diff --git a/indra/llcharacter/llmotion.cpp b/indra/llcharacter/llmotion.cpp
index 4803f855de..2d646b4ed2 100755
--- a/indra/llcharacter/llmotion.cpp
+++ b/indra/llcharacter/llmotion.cpp
@@ -111,9 +111,14 @@ void LLMotion::addJointState(const LLPointer<LLJointState>& jointState)
U32 usage = jointState->getUsage();
// for now, usage is everything
- mJointSignature[0][jointState->getJoint()->getJointNum()] = (usage & LLJointState::POS) ? (0xff >> (7 - priority)) : 0;
- mJointSignature[1][jointState->getJoint()->getJointNum()] = (usage & LLJointState::ROT) ? (0xff >> (7 - priority)) : 0;
- mJointSignature[2][jointState->getJoint()->getJointNum()] = (usage & LLJointState::SCALE) ? (0xff >> (7 - priority)) : 0;
+ S32 joint_num = jointState->getJoint()->getJointNum();
+ if ((joint_num >= (S32)LL_CHARACTER_MAX_JOINTS) || (joint_num < 0))
+ {
+ LL_WARNS() << "joint_num " << joint_num << " is outside of legal range [0-" << LL_CHARACTER_MAX_JOINTS << ")" << LL_ENDL;
+ }
+ mJointSignature[0][joint_num] = (usage & LLJointState::POS) ? (0xff >> (7 - priority)) : 0;
+ mJointSignature[1][joint_num] = (usage & LLJointState::ROT) ? (0xff >> (7 - priority)) : 0;
+ mJointSignature[2][joint_num] = (usage & LLJointState::SCALE) ? (0xff >> (7 - priority)) : 0;
}
void LLMotion::setDeactivateCallback( void (*cb)(void *), void* userdata )