From f700aa67ac67ac1e5996618074f32df30dfccccd Mon Sep 17 00:00:00 2001 From: Johnny Matthews Date: Mon, 6 Jun 2022 11:10:27 -0500 Subject: 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 --- source/blender/nodes/geometry/nodes/node_geo_duplicate_elements.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source/blender/nodes') diff --git a/source/blender/nodes/geometry/nodes/node_geo_duplicate_elements.cc b/source/blender/nodes/geometry/nodes/node_geo_duplicate_elements.cc index cde40319388..691f341b518 100644 --- a/source/blender/nodes/geometry/nodes/node_geo_duplicate_elements.cc +++ b/source/blender/nodes/geometry/nodes/node_geo_duplicate_elements.cc @@ -98,7 +98,7 @@ static void threaded_slice_fill(Span offsets, MutableSpan 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]]); -- cgit v1.2.3