diff options
author | Johnny Matthews <johnny.matthews@gmail.com> | 2022-06-06 19:10:27 +0300 |
---|---|---|
committer | Johnny Matthews <johnny.matthews@gmail.com> | 2022-06-06 19:10:27 +0300 |
commit | 128aa7f3b09802f325c151a921ac50c01c04b6e1 (patch) | |
tree | ed27d7140d41bc5bc5077f8e528468fccb0495db /source | |
parent | 34f94a02f37005210f629f04635c457d98ff5f91 (diff) |
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
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/nodes/geometry/nodes/node_geo_duplicate_elements.cc | 2 |
1 files changed, 1 insertions, 1 deletions
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 4730109f3e3..555bb689582 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<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]]); |