From 9f63820ed40302286f5e0b2d7b4c597913e48cb0 Mon Sep 17 00:00:00 2001 From: Alex Shvartzkop Date: Mon, 11 Sep 2023 09:35:07 +0300 Subject: [PATCH] Fix a bug in RebuildBezierToSegmentsPointsList. --- common/eda_shape.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/common/eda_shape.cpp b/common/eda_shape.cpp index 063c80b67c..af8bdd3650 100644 --- a/common/eda_shape.cpp +++ b/common/eda_shape.cpp @@ -478,11 +478,11 @@ void EDA_SHAPE::RebuildBezierToSegmentsPointsList( int aMinSegLen ) // Ensure last point respects aMinSegLen parameter if( m_bezierPoints.size() > 2 ) { - int idx = m_bezierPoints.size()-1; + int idx = m_bezierPoints.size() - 1; - if( VECTOR2I( m_bezierPoints[idx] - m_bezierPoints[idx]-1 ).EuclideanNorm() < aMinSegLen ) + if( VECTOR2I( m_bezierPoints[idx] - m_bezierPoints[idx] - 1 ).EuclideanNorm() < aMinSegLen ) { - m_bezierPoints[idx]-1 = m_bezierPoints[idx]; + m_bezierPoints[idx - 1] = m_bezierPoints[idx]; m_bezierPoints.pop_back(); } }