Fix #123971: Geometry Nodes: Offset Point in Curve incorrect result

There is was UB due to using of mapped vertex index as index of
offset instead of do read offsets and indices in the same way.

Pull Request: https://projects.blender.org/blender/blender/pulls/124035
This commit is contained in:
Iliya Katueshenock 2024-07-02 15:50:31 +02:00 committed by Hans Goudey
parent 953b319ea8
commit 3f6d9fa00d

@ -80,7 +80,7 @@ class ControlPointNeighborFieldInput final : public bke::CurvesFieldInput {
const int i_point = std::clamp(indices[i_selection], 0, curves.points_num() - 1);
const int i_curve = parent_curves[i_point];
const IndexRange curve_points = points_by_curve[i_curve];
const int offset_point = i_point + offsets[i_point];
const int offset_point = i_point + offsets[i_selection];
if (cyclic[i_curve]) {
output[i_selection] = apply_offset_in_cyclic_range(