diff --git a/libs/kimath/src/geometry/geometry_utils.cpp b/libs/kimath/src/geometry/geometry_utils.cpp index d2e3cd6b02..c49fff9305 100644 --- a/libs/kimath/src/geometry/geometry_utils.cpp +++ b/libs/kimath/src/geometry/geometry_utils.cpp @@ -46,6 +46,7 @@ int GetArcToSegmentCount( int aRadius, int aErrorMax, const EDA_ANGLE& aArcAngle // avoid divide-by-zero aRadius = std::max( 1, aRadius ); + aErrorMax = std::max( 1, aErrorMax ); // error relative to the radius value: double rel_error = (double)aErrorMax / aRadius;