Fix out of bounds access opportunity

This commit is contained in:
Seth Hillbrand 2024-05-02 15:12:43 -07:00
parent 2a889f03fc
commit 022dce2d1b
1 changed files with 2 additions and 1 deletions

View File

@ -2418,7 +2418,8 @@ void SHAPE_LINE_CHAIN::Simplify( int aMaxError )
{
bool too_far = false;
for( size_t ll = ( ii + 1 ) % m_points.size(); ll != kk; ++ll )
for( size_t ll = ( ii + 1 ) % m_points.size(); ll != kk;
ll = ( ll + 1 ) % m_points.size() )
{
if( !TestSegmentHitFast( m_points[ll], m_points[ii], m_points[kk], aMaxError ) )
{