ClipVertexRange: fix fallout of NextShape API change
Fixes https://gitlab.com/kicad/code/kicad/-/issues/9711
This commit is contained in:
parent
302c5ab537
commit
b1878fcc54
|
@ -1079,12 +1079,11 @@ void LINE::ClipVertexRange( int aStart, int aEnd )
|
||||||
*/
|
*/
|
||||||
int firstLink = 0;
|
int firstLink = 0;
|
||||||
int lastLink = std::max( 0, static_cast<int>( m_links.size() ) - 1 );
|
int lastLink = std::max( 0, static_cast<int>( m_links.size() ) - 1 );
|
||||||
int arcIdx = -1;
|
|
||||||
int linkIdx = 0;
|
int linkIdx = 0;
|
||||||
|
|
||||||
int numPoints = static_cast<int>( m_line.PointCount() );
|
int numPoints = static_cast<int>( m_line.PointCount() );
|
||||||
|
|
||||||
for( int i = 0; i < m_line.PointCount(); i = m_line.NextShape( i ) )
|
for( int i = 0; i >= 0 && i < m_line.PointCount(); i = m_line.NextShape( i ) )
|
||||||
{
|
{
|
||||||
if( i <= aStart )
|
if( i <= aStart )
|
||||||
firstLink = linkIdx;
|
firstLink = linkIdx;
|
||||||
|
|
Loading…
Reference in New Issue