From 8bc9d456c3244775a1e1531ec6f509fbbbe8e5c9 Mon Sep 17 00:00:00 2001 From: Seth Hillbrand Date: Thu, 3 Nov 2022 11:45:40 -0700 Subject: [PATCH] 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 --- pcbnew/tools/pcb_selection_tool.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pcbnew/tools/pcb_selection_tool.cpp b/pcbnew/tools/pcb_selection_tool.cpp index 6814238117..29a9e6e0b8 100644 --- a/pcbnew/tools/pcb_selection_tool.cpp +++ b/pcbnew/tools/pcb_selection_tool.cpp @@ -2904,7 +2904,7 @@ void PCB_SELECTION_TOOL::GuessSelectionCandidates( GENERAL_COLLECTOR& aCollector } else if( item->Type() == PCB_BITMAP_T ) { - VECTOR2I size = static_cast( item )->GetSize(); + VECTOR2D size = static_cast( item )->GetSize(); area = size.x * size.y; } else