From: liuli Date: Fri, 3 Sep 2021 08:59:26 +0000 (+0800) Subject: Update options.c X-Git-Tag: v2.4b1~41^2~2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7a9f66c0f880149b45a0d05d43451f556a6c83bc;p=thirdparty%2Fcups.git Update options.c --- diff --git a/cups/options.c b/cups/options.c index b95785b84d..d4ca1fee8f 100644 --- a/cups/options.c +++ b/cups/options.c @@ -604,16 +604,16 @@ _cupsGet1284Values( if (ptr < (value + sizeof(value) - 1)) *ptr++ = *device_id; - if (!*device_id && strlen(value) == 0) - break; - while (ptr > value && _cups_isspace(ptr[-1])) ptr --; *ptr = '\0'; + if (ptr > value) + num_values = cupsAddOption(key, value, num_values, values); + + if (!*device_id) + break; device_id ++; - - num_values = cupsAddOption(key, value, num_values, values); } return (num_values);