diff options
| author | Oz Linden <oz@lindenlab.com> | 2015-08-26 12:07:16 -0400 |
|---|---|---|
| committer | Oz Linden <oz@lindenlab.com> | 2015-08-26 12:07:16 -0400 |
| commit | 712a4e70c81c1908e4e7668ff1695a9415ec4b71 (patch) | |
| tree | b5312334f90e4359dce19eb696954dbcca5f5fd6 /indra/newview/llavatarrenderinfoaccountant.cpp | |
| parent | 206ef7a1562db19a4d8a41e55b7272c917f4b62c (diff) | |
refine fix for MAINT-5560 based on review feedback and to fix VS objection
Diffstat (limited to 'indra/newview/llavatarrenderinfoaccountant.cpp')
| -rw-r--r-- | indra/newview/llavatarrenderinfoaccountant.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/indra/newview/llavatarrenderinfoaccountant.cpp b/indra/newview/llavatarrenderinfoaccountant.cpp index 03204ea48f..d351b38653 100644 --- a/indra/newview/llavatarrenderinfoaccountant.cpp +++ b/indra/newview/llavatarrenderinfoaccountant.cpp @@ -268,8 +268,10 @@ void LLAvatarRenderInfoAccountant::sendRenderInfoToRegion(LLViewerRegion * regio LLSD info = LLSD::emptyMap(); U32 avatar_complexity = avatar->getVisualComplexity(); - if (avatar_complexity > 0) + if (avatar_complexity > 0) { + // the weight/complexity is unsigned, but LLSD only stores signed integers, + // so if it's over that (which would be ridiculously high), just store the maximum signed int value info[KEY_WEIGHT] = (S32)(avatar_complexity < S32_MAX ? avatar_complexity : S32_MAX); info[KEY_TOO_COMPLEX] = LLSD::Boolean(avatar->isTooComplex()); agents[avatar->getID().asString()] = info; |
