Shape Healing - Crash in ShapeConstruct_ProjectCurveOnSurface::insertAdditionalPointOrAdjust() (#1267)

To input parameters of ShapeConstruct_ProjectCurveOnSurface::insertAdditionalPointOrAdjust() new arrays were assigned. The size of new arrays are guaranteed to be 1 element larger that original array. NCollection_Array1::Assign() is guaranteed to throw exception when arrays size mismatch. So, given that assignment code is reached, function will always throw.
Fixed by calling move assignment instead - size mismatch is allowed in this case. Also it is more optimal.
This commit is contained in:
Dmitrii Kulikov
2026-05-05 18:16:32 +01:00
committed by GitHub
parent 9281002280
commit 6f6be66842

View File

@@ -2129,9 +2129,9 @@ void ShapeConstruct_ProjectCurveOnSurface::insertAdditionalPointOrAdjust(
aNewPoints2d.SetValue(i + 1, thePoints2d(i));
}
thePoints = aNewPoints;
theParams = aNewParams;
thePoints2d = aNewPoints2d;
thePoints = std::move(aNewPoints);
theParams = std::move(aNewParams);
thePoints2d = std::move(aNewPoints2d);
theIndex++;
}
else