Fix PNS deleting too many segments

Don't exit the loop pre-emptively. Need to update lastLink.
This commit is contained in:
Roberto Fernandez Bautista 2021-07-07 19:54:19 +01:00
parent cda26bd57b
commit 4207165c26
1 changed files with 2 additions and 2 deletions

View File

@ -1084,12 +1084,12 @@ void LINE::ClipVertexRange( int aStart, int aEnd )
int numPoints = static_cast<int>( m_line.PointCount() );
for( int i = 0; i >= 0 && i < m_line.PointCount(); i = m_line.NextShape( i ) )
for( int i = 0; i < m_line.PointCount(); i = m_line.NextShape( i ) )
{
if( i <= aStart )
firstLink = linkIdx;
if( i == -1 || i >= aEnd - 1 || linkIdx >= lastLink )
if( i < 0 || i >= aEnd - 1 || linkIdx >= lastLink )
{
lastLink = linkIdx;
break;