From 712a4e70c81c1908e4e7668ff1695a9415ec4b71 Mon Sep 17 00:00:00 2001 From: Oz Linden Date: Wed, 26 Aug 2015 12:07:16 -0400 Subject: refine fix for MAINT-5560 based on review feedback and to fix VS objection --- indra/newview/llavatarrenderinfoaccountant.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'indra/newview/llavatarrenderinfoaccountant.cpp') 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; -- cgit v1.2.3