summaryrefslogtreecommitdiff
path: root/indra/llprimitive/llmodel.cpp
diff options
context:
space:
mode:
authorMaximB ProductEngine <mberezhnoy@productengine.com>2013-09-23 20:28:23 +0300
committerMaximB ProductEngine <mberezhnoy@productengine.com>2013-09-23 20:28:23 +0300
commit089081dc802a8efb41d3eda7b2eec6f9637f1c4b (patch)
tree6d08c1ef1cd3691ab225a0c281d002b9d2af62cb /indra/llprimitive/llmodel.cpp
parent3e934d5089abacbfb1c7bfbaff4a2d415587bfbb (diff)
parent3bfac42f07b1896bea3fd1ece762c56e3f1fc819 (diff)
merge
Diffstat (limited to 'indra/llprimitive/llmodel.cpp')
-rwxr-xr-xindra/llprimitive/llmodel.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/indra/llprimitive/llmodel.cpp b/indra/llprimitive/llmodel.cpp
index e236f98fe6..37f0bfcbb8 100755
--- a/indra/llprimitive/llmodel.cpp
+++ b/indra/llprimitive/llmodel.cpp
@@ -218,8 +218,9 @@ LLModel::EModelStatus load_face_from_dom_triangles(std::vector<LLVolumeFace>& fa
{
// guard against model data specifiying out of range indices or tcs
//
+
if (((i + tc_offset) > index_count)
- || ((idx[i+pos_offset]*2+1) > tc_count))
+ || ((idx[i+tc_offset]*2+1) > tc_count))
{
return LLModel::BAD_ELEMENT;
}
@@ -451,7 +452,7 @@ LLModel::EModelStatus load_face_from_dom_polylist(std::vector<LLVolumeFace>& fac
{
// guard against model data specifiying out of range indices or tcs
//
- if (((i + pos_offset) > index_count)
+ if (((cur_idx + tc_offset) > index_count)
|| ((idx[cur_idx+tc_offset]*2+1) > tc_count))
{
return LLModel::BAD_ELEMENT;
@@ -471,7 +472,7 @@ LLModel::EModelStatus load_face_from_dom_polylist(std::vector<LLVolumeFace>& fac
{
// guard against model data specifiying out of range indices or norms
//
- if (((i + pos_offset) > index_count)
+ if (((cur_idx + norm_offset) > index_count)
|| ((idx[cur_idx+norm_offset]*3+2) > norm_count))
{
return LLModel::BAD_ELEMENT;