Fix T95137: Spline calc_length not working with just 1 NURB point

The NURB case did not properly handle a curve with only 1 point.

Ref D13904
This commit is contained in:
Jesse Yurkovich 2022-02-03 22:39:57 +11:00 • committed by Philipp Oeser
parent df5da16aa1
commit 3cfccf1199

View file

@ -915,7 +915,7 @@ float BKE_nurb_calc_length(const Nurb *nu, int resolution)
pntsit = points + 3;
}
while (--b) {
while (--b > 0) {
length += len_v3v3(prevpntsit, pntsit);
prevpntsit = pntsit;
pntsit += 3;