router: fix array out-of-bound error in HullIntersection()
fixes: https://gitlab.com/kicad/code/kicad/-/issues/8538
This commit is contained in:
parent
3e98c44636
commit
a744857267
|
@ -271,7 +271,7 @@ void HullIntersection( const SHAPE_LINE_CHAIN& hull, const SHAPE_LINE_CHAIN& lin
|
||||||
|
|
||||||
hull.Intersect( line, ips_raw );
|
hull.Intersect( line, ips_raw );
|
||||||
|
|
||||||
for( const auto& p : ips_raw )
|
for( auto& p : ips_raw )
|
||||||
{
|
{
|
||||||
SHAPE_LINE_CHAIN::INTERSECTION ipp;
|
SHAPE_LINE_CHAIN::INTERSECTION ipp;
|
||||||
|
|
||||||
|
@ -289,6 +289,9 @@ void HullIntersection( const SHAPE_LINE_CHAIN& hull, const SHAPE_LINE_CHAIN& lin
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if( p.index_our >= hull.SegmentCount() )
|
||||||
|
p.index_our -= hull.SegmentCount();
|
||||||
|
|
||||||
if( p.is_corner_our )
|
if( p.is_corner_our )
|
||||||
{
|
{
|
||||||
d1[0] = hull.CSegment( p.index_our );
|
d1[0] = hull.CSegment( p.index_our );
|
||||||
|
|
Loading…
Reference in New Issue