summaryrefslogtreecommitdiff
path: root/indra/llmath
diff options
context:
space:
mode:
authorGraham Madarasz (Graham Linden) <graham@lindenlab.com>2013-03-13 13:38:30 -0700
committerGraham Madarasz (Graham Linden) <graham@lindenlab.com>2013-03-13 13:38:30 -0700
commitbba84a3fa9a1af87f6a8080f9093f9277feb1292 (patch)
tree4fc9a3ecaf8381b6929aed63ba09a094b06b251a /indra/llmath
parente8b8a12b7365c17cf0326be365b78bcb1da1bfac (diff)
Cleanup per code review of prev change with DaveP
Diffstat (limited to 'indra/llmath')
-rw-r--r--indra/llmath/llvolume.cpp11
1 files changed, 7 insertions, 4 deletions
diff --git a/indra/llmath/llvolume.cpp b/indra/llmath/llvolume.cpp
index cb5633c1bb..edd16b5688 100644
--- a/indra/llmath/llvolume.cpp
+++ b/indra/llmath/llvolume.cpp
@@ -4729,11 +4729,13 @@ void LLVolumeFace::optimize(F32 angle_cutoff)
}
}
- if (new_face.mNumVertices)
+ // disallow data amplification
+ //
+ if (new_face.mNumVertices <= mNumVertices)
{
- llassert(new_face.mNumIndices == mNumIndices);
- swapData(new_face);
- }
+ llassert(new_face.mNumIndices == mNumIndices);
+ swapData(new_face);
+ }
}
class LLVCacheTriangleData;
@@ -6731,3 +6733,4 @@ void calc_binormal_from_triangle(LLVector4a& binormal,
binormal.set( 0, 1 , 0 );
}
}
+