From: mike Date: Fri, 28 Feb 2003 10:28:25 +0000 (+0000) Subject: Don't append / to attribute specification string if no / is in the X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=0ea1692da0dd75a14b3cb51fe01455d29977ee23;p=thirdparty%2Fcups.git Don't append / to attribute specification string if no / is in the original attribute line in the file. git-svn-id: svn+ssh://src.apple.com/svn/cups/cups.org/trunk@3409 7a7537e8-13f0-0310-91df-b6672ffda945 --- diff --git a/cups/ppd.c b/cups/ppd.c index 3f33b078b7..60bef9f82e 100644 --- a/cups/ppd.c +++ b/cups/ppd.c @@ -1,5 +1,5 @@ /* - * "$Id: ppd.c,v 1.99 2003/02/25 19:06:39 mike Exp $" + * "$Id: ppd.c,v 1.100 2003/02/28 10:28:25 mike Exp $" * * PPD file routines for the Common UNIX Printing System (CUPS). * @@ -1882,8 +1882,13 @@ ppdOpen(FILE *fp) /* I - File to read from */ { char spec[PPD_MAX_NAME + PPD_MAX_TEXT]; - snprintf(spec, sizeof(spec), "%s/%s", name, text); - ppd_add_attr(ppd, keyword, spec, string); + if (text[0]) + { + snprintf(spec, sizeof(spec), "%s/%s", name, text); + ppd_add_attr(ppd, keyword, spec, string); + } + else + ppd_add_attr(ppd, keyword, name, string); string = NULL; /* Don't free this string below */ } @@ -2974,5 +2979,5 @@ ppd_read(FILE *fp, /* I - File to read from */ /* - * End of "$Id: ppd.c,v 1.99 2003/02/25 19:06:39 mike Exp $". + * End of "$Id: ppd.c,v 1.100 2003/02/28 10:28:25 mike Exp $". */