summaryrefslogtreecommitdiff
path: root/indra/llprimitive/llprimitive.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/llprimitive/llprimitive.cpp')
-rw-r--r--indra/llprimitive/llprimitive.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/indra/llprimitive/llprimitive.cpp b/indra/llprimitive/llprimitive.cpp
index 5ad758072c..c30ef0350f 100644
--- a/indra/llprimitive/llprimitive.cpp
+++ b/indra/llprimitive/llprimitive.cpp
@@ -744,8 +744,6 @@ BOOL LLPrimitive::setVolume(const LLVolumeParams &volume_params, const S32 detai
return TRUE;
}
- U32 old_face_mask = mVolumep->mFaceMask;
-
S32 face_bit = 0;
S32 cur_mask = 0;
@@ -1083,7 +1081,7 @@ BOOL LLPrimitive::packTEMessage(LLMessageSystem *mesgsys) const
U8 packed_buffer[MAX_TE_BUFFER];
U8 *cur_ptr = packed_buffer;
- S32 last_face_index = getNumTEs() - 1;
+ S32 last_face_index = llmin((U32) getNumTEs(), MAX_TES) - 1;
if (last_face_index > -1)
{
@@ -1364,7 +1362,7 @@ S32 LLPrimitive::unpackTEMessage(LLDataPacker &dp)
return retval;
}
- face_count = getNumTEs();
+ face_count = llmin((U32) getNumTEs(), MAX_TES);
U32 i;
cur_ptr += unpackTEField(cur_ptr, packed_buffer+size, (U8 *)image_data, 16, face_count, MVT_LLUUID);