summaryrefslogtreecommitdiff
path: root/indra/newview/llface.cpp
diff options
context:
space:
mode:
authorDave Parks <davep@lindenlab.com>2012-07-11 15:17:13 -0500
committerDave Parks <davep@lindenlab.com>2012-07-11 15:17:13 -0500
commit997b360747bb21564f0ef89c3b3e065ea3ec0716 (patch)
treecfc63cf9ecb003081c75001ce47b4fa13e1dceeb /indra/newview/llface.cpp
parentf7f27e4f2617c3656b273117543ecd92ef5ac495 (diff)
MAINT-794 Fix for assert on loading some types of objects before their parents.
Diffstat (limited to 'indra/newview/llface.cpp')
-rw-r--r--indra/newview/llface.cpp11
1 files changed, 4 insertions, 7 deletions
diff --git a/indra/newview/llface.cpp b/indra/newview/llface.cpp
index 49a20d5ef9..2d84c5d7de 100644
--- a/indra/newview/llface.cpp
+++ b/indra/newview/llface.cpp
@@ -1945,15 +1945,12 @@ BOOL LLFace::getGeometryVolume(const LLVolume& volume,
LLVector4a texIdx;
- U8 index = mTextureIndex < 255 ? mTextureIndex : 0;
+ S32 index = mTextureIndex < 255 ? mTextureIndex : 0;
F32 val = 0.f;
- U8* vp = (U8*) &val;
- vp[0] = index;
- vp[1] = 0;
- vp[2] = 0;
- vp[3] = 0;
-
+ S32* vp = (S32*) &val;
+ *vp = index;
+
llassert(index <= LLGLSLShader::sIndexedTextureChannels-1);
LLVector4Logical mask;