Fix copy/pasta in SHAPE_LINE_CHAIN::Collide().

Fixes https://gitlab.com/kicad/code/kicad/-/issues/17636
This commit is contained in:
Jeff Young 2024-03-31 18:12:00 +01:00
parent 6078bc52eb
commit dfa16eda95
1 changed files with 2 additions and 2 deletions

View File

@ -679,13 +679,13 @@ bool SHAPE_LINE_CHAIN::Collide( const SEG& aSeg, int aClearance, int* aActual,
}
}
if( closest_dist_sq == 0 || closest_dist_sq < clearance_sq )
if( closest_dist == 0 || closest_dist < aClearance )
{
if( aLocation )
*aLocation = nearest;
if( aActual )
*aActual = sqrt( closest_dist_sq );
*aActual = closest_dist;
return true;
}