Skip to content

Commit f105bb5

Browse files
committed
indexgenerator: Fix index_count assertion in generateVertexRemapMulti
In generateVertexRemap and generateVertexRemapCustom, we permit the use on non-indexed data if the number of elements is not divisible by 3. This does not affect the algorithm; the assertion is there to flag accidental incorrect uses, and this change aligns the assertion between all three function variants.
1 parent 04057be commit f105bb5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/indexgenerator.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -325,7 +325,7 @@ size_t meshopt_generateVertexRemapMulti(unsigned int* destination, const unsigne
325325
using namespace meshopt;
326326

327327
assert(indices || index_count == vertex_count);
328-
assert(index_count % 3 == 0);
328+
assert(!indices || index_count % 3 == 0);
329329
assert(stream_count > 0 && stream_count <= 16);
330330

331331
for (size_t i = 0; i < stream_count; ++i)

0 commit comments

Comments
 (0)