Fix: Assert in set spline type node after recent commit

My own error when committing 0602852860. It appears that
the "Endpoint" knots modes should be handled together, otherwise
out of bounds array access is possible.
This commit is contained in:
Hans Goudey 2022-03-11 11:27:18 -06:00
parent ae3c8bc9f0
commit dbd9472ef5
1 changed files with 1 additions and 1 deletions

View File

@ -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];