1
0
mirror of git://projects.qi-hardware.com/fped.git synced 2024-11-22 14:31:53 +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:
werner 2010-10-31 12:11:18 +00:00
parent feae08fc9e
commit 177fe9cc36

View File

@ -297,9 +297,11 @@ static void gui_draw_pad_text(struct inst *self)
hole_max = translate(self->u.pad.hole->u.hole.other);
sort_coord(&hole_min, &hole_max);
box_min.x = box_min.y = box_max.x = box_max.y;
maximize_box(&box_min, &box_max,
pad_min.x, pad_min.y, pad_max.x, hole_min.y); /* top */
box_min.x = pad_min.x; /* top */
box_min.y = pad_min.y;
box_max.x = pad_max.x;
box_max.y = hole_min.y;
maximize_box(&box_min, &box_max,
pad_min.x, hole_max.y, pad_max.x, pad_max.y); /* bottom */
maximize_box(&box_min, &box_max,