commit bd79343b7e0a36a6ac4fb8756b5b156531eb6f93 Author: magnum Date: Wed Jul 1 01:44:58 2015 +0200 Allow an option argument string to contain an equal sign when the delimiter is a colon. Closes #1481. diff --git a/src/getopt.c b/src/getopt.c index 531eaa3..8ee3a52 100644 --- a/src/getopt.c +++ b/src/getopt.c @@ -43,6 +43,9 @@ static char *opt_find(struct opt_entry *list, char *opt, if (!(param = strchr(name, '='))) param = strchr(name, ':'); if (param) { + char *c = strchr(name, ':'); + if (c && param > c) + param = c; length = param - name; if (!*++param) param = NULL; } else