Clamp LLMeshSkinInfo::mJointNames to a max of 64 entries. Also checking size in lldrawpoolavatar(Redundant checks added to just match similar logic LLRiggedVolume::update more closely.)

This commit is contained in:
Shyotl
2013-03-30 01:01:53 -05:00
parent 1965224912
commit 03272c8875
2 changed files with 11 additions and 6 deletions

View File

@@ -2076,7 +2076,8 @@ void LLMeshSkinInfo::fromLLSD(LLSD& skin)
{
if (skin.has("joint_names"))
{
for (U32 i = 0; i < (U32)skin["joint_names"].size(); ++i)
const U32 joint_count = llmin((U32)skin["joint_names"].size(),(U32)64);
for (U32 i = 0; i < joint_count; ++i)
{
mJointNames.push_back(skin["joint_names"][i]);
}