Geometry Nodes: Fix Assert in Duplicate Elements

The original assert did not take into account the offset size in the loop being -1. The tests were then run in non-debug mode, so while the mesh regressions still passed, the false positive asserts that happened were not caught.

Differential Revision: https://developer.blender.org/D15136
This commit is contained in:
Johnny Matthews 2022-06-06 11:10:27 -05:00
parent 34f94a02f3
commit 128aa7f3b0
1 changed files with 1 additions and 1 deletions

View File

@ -98,7 +98,7 @@ static void threaded_slice_fill(Span<int> offsets,
MutableSpan<T> dst)
{
BLI_assert(offsets.last() == dst.size());
BLI_assert(selection.size() == offsets.size());
BLI_assert(selection.size() == offsets.size() - 1);
threading::parallel_for(IndexRange(offsets.size() - 1), 512, [&](IndexRange range) {
for (const int i : range) {
dst.slice(range_for_offsets_index(offsets, i)).fill(src[selection[i]]);