Fixes a bug in OsdUtilVertexSplit that occurs when getting the address of the end of a std::vector.

This commit is contained in:
Nathan Litke 2014-08-05 18:11:57 -07:00
parent df719eb9ed
commit 22d4939563

View File

@ -94,9 +94,9 @@ OsdUtilVertexSplit<T>::OsdUtilVertexSplit(FarMesh<T> * mesh)
++vertexRange.first, ++j) ++vertexRange.first, ++j)
{ {
int fvar = vertexRange.first->second; int fvar = vertexRange.first->second;
if (std::equal(&fvarDataTable[i * fvarWidth], const float* fvarData = &fvarDataTable[fvar * fvarWidth];
&fvarDataTable[(i + 1) * fvarWidth], if (std::equal(fvarData, fvarData + fvarWidth,
&fvarDataTable[fvar * fvarWidth])) &fvarDataTable[i * fvarWidth]))
{ {
splitTable[i] = j; splitTable[i] = j;
goto split_vertex; goto split_vertex;