From e1f4e03a28eb7d0f469d5f301be097b0ef141f63 Mon Sep 17 00:00:00 2001 From: werner Date: Wed, 23 Mar 2011 06:45:04 +0000 Subject: [PATCH] fped: don't output pad names consisting only of spaces Such names have an invalid size and may trip the Postscript/PDF interpreter. - postscript.c (ps_pad_name): don't output names consisting only of spaces git-svn-id: http://svn.openmoko.org/trunk/eda/fped@6002 99fdad57-331a-0410-800a-d7fa5415bdb3 --- postscript.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/postscript.c b/postscript.c index d059339..b1de11c 100644 --- a/postscript.c +++ b/postscript.c @@ -192,9 +192,11 @@ static void ps_pad_name(FILE *file, const struct inst *inst) { struct coord a = inst->base; struct coord b = inst->u.pad.other; + const char *s; unit_type h, w; - if (!*inst->u.pad.name) + for (s = inst->u.pad.name; *s == ' '; s++); + if (!*s) return; h = a.y-b.y; w = a.x-b.x;