foomatic/foomatic-filters-int-options.patch

14 lines
599 B
Diff

diff -up foomatic-filters-4.0.3/options.c.int-options foomatic-filters-4.0.3/options.c
--- foomatic-filters-4.0.3/options.c.int-options 2009-08-19 19:08:41.000000000 +0100
+++ foomatic-filters-4.0.3/options.c 2010-01-19 16:43:09.343981005 +0000
@@ -863,7 +863,8 @@ int option_get_command(dstr_t *cmd, opti
/* If the value is set to a predefined choice */
choice = option_find_choice(opt, valstr);
- if (choice) {
+ if (choice && (*choice->command ||
+ ((opt->type != TYPE_INT) && (opt->type != TYPE_FLOAT)))) {
dstrcpy(cmd, choice->command);
return 1;
}