Fix area selection calculation

area was a double value for comparison of large numbers.  But the
promotion from int happened after the multiplication (and overflow) for
large images

Fixes https://gitlab.com/kicad/code/kicad/issues/12821
This commit is contained in:
Seth Hillbrand 2022-11-03 11:45:40 -07:00
parent d8ddeea14a
commit 8bc9d456c3
1 changed files with 1 additions and 1 deletions

View File

@ -2904,7 +2904,7 @@ void PCB_SELECTION_TOOL::GuessSelectionCandidates( GENERAL_COLLECTOR& aCollector
}
else if( item->Type() == PCB_BITMAP_T )
{
VECTOR2I size = static_cast<const PCB_BITMAP*>( item )->GetSize();
VECTOR2D size = static_cast<const PCB_BITMAP*>( item )->GetSize();
area = size.x * size.y;
}
else