Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHans Goudey <h.goudey@me.com>2022-03-11 20:27:18 +0300
committerHans Goudey <h.goudey@me.com>2022-03-11 20:27:34 +0300
commitdbd9472ef58174e8af011735b0b1bd87a7447348 (patch)
treea69713e50da2ef89e62507c17f2ada4b6d42220c /source/blender
parentae3c8bc9f098b1be19da19f9d555bc7b22c2d03c (diff)
Fix: Assert in set spline type node after recent commit
My own error when committing 0602852860dda. It appears that the "Endpoint" knots modes should be handled together, otherwise out of bounds array access is possible.
Diffstat (limited to 'source/blender')
-rw-r--r--source/blender/nodes/geometry/nodes/node_geo_curve_spline_type.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/source/blender/nodes/geometry/nodes/node_geo_curve_spline_type.cc b/source/blender/nodes/geometry/nodes/node_geo_curve_spline_type.cc
index 6928cde638c..1b4429cc527 100644
--- a/source/blender/nodes/geometry/nodes/node_geo_curve_spline_type.cc
+++ b/source/blender/nodes/geometry/nodes/node_geo_curve_spline_type.cc
@@ -65,7 +65,6 @@ static void nurbs_to_bezier_assign(const Span<T> input,
switch (knotsMode) {
case NURBSpline::KnotsMode::Bezier:
- case NURBSpline::KnotsMode::EndPointBezier:
scale_input_assign<T>(input, 3, 1, r_output);
break;
case NURBSpline::KnotsMode::Normal:
@@ -73,6 +72,7 @@ static void nurbs_to_bezier_assign(const Span<T> input,
r_output[i] = input[(i + 1) % input_size];
}
break;
+ case NURBSpline::KnotsMode::EndPointBezier:
case NURBSpline::KnotsMode::EndPoint:
for (const int i : IndexRange(1, output_size - 2)) {
r_output[i] = input[i + 1];