r5994 - trunk/eda/fped

werner at docs.openmoko.org werner at docs.openmoko.org
Sun Oct 31 13:11:19 CET 2010


Author: werner
Date: 2010-10-31 13:11:18 +0100 (Sun, 31 Oct 2010)
New Revision: 5994

Modified:
   trunk/eda/fped/gui_inst.c
Log:
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



Modified: trunk/eda/fped/gui_inst.c
===================================================================
--- trunk/eda/fped/gui_inst.c	2010-10-31 01:34:51 UTC (rev 5993)
+++ trunk/eda/fped/gui_inst.c	2010-10-31 12:11:18 UTC (rev 5994)
@@ -297,10 +297,12 @@
 	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;
+	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, pad_min.y, pad_max.x, hole_min.y);	/* top */
-	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,
 	    pad_min.x, pad_min.y, hole_min.x, pad_max.y);	/* left */




More information about the commitlog mailing list