aboutsummaryrefslogtreecommitdiffstats
path: root/src/gamma.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/gamma.c')
-rw-r--r--src/gamma.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/gamma.c b/src/gamma.c
index a66f2b2..44042d0 100644
--- a/src/gamma.c
+++ b/src/gamma.c
@@ -63,9 +63,12 @@ try_start(const struct gamma_method *method, GAMMA_STATE **state_out, struct con
goto set_option_fail;
/* Set method options from command line */
- while (args) {
- next_arg = strchr(args, ':');
- if (next_arg)
+ for (; args && *args; args = next_arg) {
+ if (!strncasecmp(args, "display=", sizeof("display=") - 1U))
+ next_arg = &args[strcspn(args, ";")];
+ else
+ next_arg = &args[strcspn(args, ";:")];
+ if (*next_arg)
*next_arg++ = '\0';
key = args;
@@ -78,8 +81,6 @@ try_start(const struct gamma_method *method, GAMMA_STATE **state_out, struct con
if (method->set_option(*state_out, key, value) < 0)
goto set_option_fail;
-
- args = next_arg;
}
/* Start method */