summaryrefslogtreecommitdiff
path: root/indra/llprimitive/llprimitive.cpp
diff options
context:
space:
mode:
authorDavid Parks <davep@lindenlab.com>2009-11-02 19:55:37 +0000
committerDavid Parks <davep@lindenlab.com>2009-11-02 19:55:37 +0000
commit3e80fa3dbc943de9b784fedc202ba38cf238f46d (patch)
treedeeaedd0bf4ed9eb9f99ec47325198efce512e5f /indra/llprimitive/llprimitive.cpp
parent9a196cdda8fa62b90f6f390b21986712d198f03e (diff)
Sync up with render-pipeline-7 ignore-dead-branch
Diffstat (limited to 'indra/llprimitive/llprimitive.cpp')
-rw-r--r--indra/llprimitive/llprimitive.cpp15
1 files changed, 4 insertions, 11 deletions
diff --git a/indra/llprimitive/llprimitive.cpp b/indra/llprimitive/llprimitive.cpp
index b102254b62..2675a27c08 100644
--- a/indra/llprimitive/llprimitive.cpp
+++ b/indra/llprimitive/llprimitive.cpp
@@ -744,18 +744,11 @@ BOOL LLPrimitive::setVolume(const LLVolumeParams &volume_params, const S32 detai
return TRUE;
}
- U32 old_face_mask = mVolumep->mFaceMask;
-
// build the new object
sVolumeManager->unrefVolume(mVolumep);
mVolumep = volumep;
-
- U32 new_face_mask = mVolumep->mFaceMask;
- if (old_face_mask != new_face_mask)
- {
- setNumTEs(mVolumep->getNumFaces());
- }
-
+ setNumTEs(mVolumep->getNumFaces());
+
return TRUE;
}
@@ -898,7 +891,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)
{
@@ -1179,7 +1172,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);