summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael R Sweet <michael.r.sweet@gmail.com>2021-10-01 11:12:13 -0400
committerMichael R Sweet <michael.r.sweet@gmail.com>2021-10-01 11:12:13 -0400
commit0067573264fa0ed44d620ace5eda346d967dd4ec (patch)
tree966474ca2f35c97d7c4e2363624ee6c5b3e5b00d
parentc702e855d84e572ae3fd46566f644b08fe19d722 (diff)
downloadcups-0067573264fa0ed44d620ace5eda346d967dd4ec.tar.gz
Merge relevant portion of _cupsGet1284Values changes in OpenPrinting (Issue #5972)
-rw-r--r--cups/options.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/cups/options.c b/cups/options.c
index 11814c9af..e45858c2c 100644
--- a/cups/options.c
+++ b/cups/options.c
@@ -603,16 +603,15 @@ _cupsGet1284Values(
if (ptr < (value + sizeof(value) - 1))
*ptr++ = *device_id;
- if (!*device_id)
- break;
-
while (ptr > value && _cups_isspace(ptr[-1]))
ptr --;
*ptr = '\0';
- device_id ++;
-
num_values = cupsAddOption(key, value, num_values, values);
+
+ if (!*device_id)
+ break;
+ device_id ++;
}
return (num_values);