mirror of
git://projects.qi-hardware.com/fped.git
synced 2024-11-18 06:59:43 +02:00
The box coordinates were not properly initialized in gui_draw_pad_text
- gui_inst.c (gui_draw_pad_text): box_min and box_max were initialized to an undefined value, upsetting valgrind and yielding an incorrect location if pad and hole had the same size git-svn-id: http://svn.openmoko.org/trunk/eda/fped@5994 99fdad57-331a-0410-800a-d7fa5415bdb3
This commit is contained in:
parent
feae08fc9e
commit
177fe9cc36
@ -297,9 +297,11 @@ static void gui_draw_pad_text(struct inst *self)
|
|||||||
hole_max = translate(self->u.pad.hole->u.hole.other);
|
hole_max = translate(self->u.pad.hole->u.hole.other);
|
||||||
sort_coord(&hole_min, &hole_max);
|
sort_coord(&hole_min, &hole_max);
|
||||||
|
|
||||||
box_min.x = box_min.y = box_max.x = box_max.y;
|
box_min.x = pad_min.x; /* top */
|
||||||
maximize_box(&box_min, &box_max,
|
box_min.y = pad_min.y;
|
||||||
pad_min.x, pad_min.y, pad_max.x, hole_min.y); /* top */
|
box_max.x = pad_max.x;
|
||||||
|
box_max.y = hole_min.y;
|
||||||
|
|
||||||
maximize_box(&box_min, &box_max,
|
maximize_box(&box_min, &box_max,
|
||||||
pad_min.x, hole_max.y, pad_max.x, pad_max.y); /* bottom */
|
pad_min.x, hole_max.y, pad_max.x, pad_max.y); /* bottom */
|
||||||
maximize_box(&box_min, &box_max,
|
maximize_box(&box_min, &box_max,
|
||||||
|
Loading…
Reference in New Issue
Block a user