Index: search.c =================================================================== --- search.c (revision 15684) +++ search.c (revision 15685) @@ -154,7 +154,7 @@ TEST_OBJST(i->objst, i->req_flag, l, l, l); - if (!pcb_is_point_in_pad(PosX, PosY, SearchRadius, (pcb_pad_t *) l)) + if (!pcb_is_point_in_line(PosX, PosY, SearchRadius, (pcb_pad_t *) l)) return PCB_R_DIR_NOT_FOUND; *i->Line = l; *i->Point = (pcb_point_t *) l; @@ -847,10 +847,10 @@ } /* --------------------------------------------------------------------------- - * Check if a circle of Radius with center at (X, Y) intersects a Pad. - * Written to enable arbitrary pad directions; for rounded pads, too. + * Check if a circle of Radius with center at (X, Y) intersects a line. + * Written to enable arbitrary line directions; for rounded/square lines, too. */ -pcb_bool pcb_is_point_in_pad(pcb_coord_t X, pcb_coord_t Y, pcb_coord_t Radius, pcb_pad_t *Pad) +pcb_bool pcb_is_point_in_line(pcb_coord_t X, pcb_coord_t Y, pcb_coord_t Radius, pcb_any_line_t *Pad) { double r, Sin, Cos; pcb_coord_t x; @@ -858,7 +858,7 @@ /* Also used from line_callback with line type smaller than pad type; use the smallest common subset; ->Thickness is still ok. */ pcb_coord_t t2 = (Pad->Thickness + 1) / 2, range; - pcb_any_line_t pad = *(pcb_any_line_t *) Pad; + pcb_any_line_t pad = *Pad; /* series of transforms saving range */