From 8dead93504362b4b975d69bf1741a5e1356f98dd Mon Sep 17 00:00:00 2001 From: Wolfgang Herget Date: Thu, 20 Nov 2014 16:42:41 +0100 Subject: [PATCH] ColladaParser: don't arbitrarily limit number of per-vertex attributes. --- code/ColladaParser.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/code/ColladaParser.cpp b/code/ColladaParser.cpp index 3d63168b8..dc44d826f 100644 --- a/code/ColladaParser.cpp +++ b/code/ColladaParser.cpp @@ -2168,9 +2168,9 @@ void ColladaParser::CopyVertex(size_t currentVertex, size_t numOffsets, size_t n size_t maxIndexRequested = currentPrimitive * numOffsets * numPoints + (currentVertex + 1) * numOffsets - 1; ai_assert(maxIndexRequested < indices.size()); - // read all indices for this vertex. Yes, in a hacky local array - ai_assert(numOffsets < 20 && perVertexOffset < 20); - size_t vindex[20]; + // copy the indices pertaining to this vertex + std::vector vindex; + vindex.reserve(numOffsets); for (size_t offsets = 0; offsets < numOffsets; ++offsets) vindex[offsets] = indices[currentPrimitive * numOffsets * numPoints + currentVertex * numOffsets + offsets];