Date:2010-10-31 13:11:18 (7 years 3 months ago)
Author:werner
Commit:177fe9cc36566077f1182941d817bc85ce7fee81
Message: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
Files: gui_inst.c (1 diff)

Change Details

gui_inst.c
297297    hole_max = translate(self->u.pad.hole->u.hole.other);
298298    sort_coord(&hole_min, &hole_max);
299299
300    box_min.x = box_min.y = box_max.x = box_max.y;
301    maximize_box(&box_min, &box_max,
302        pad_min.x, pad_min.y, pad_max.x, hole_min.y); /* top */
300    box_min.x = pad_min.x; /* top */
301    box_min.y = pad_min.y;
302    box_max.x = pad_max.x;
303    box_max.y = hole_min.y;
304
303305    maximize_box(&box_min, &box_max,
304306        pad_min.x, hole_max.y, pad_max.x, pad_max.y); /* bottom */
305307    maximize_box(&box_min, &box_max,

Archive Download the corresponding diff file

Branches:
master



interactive