int ret = 0;
lc_opt_err_info_t err;
- char *end, *buf;
+ char *end, *buf, *eqsign;
if(n >= n_prefix && strncmp(opt_prefix, arg, n_prefix) == 0) {
arg = arg + n_prefix;
/* find the next delimiter (the -) and extract the string up to
* there. */
- end = strchr(arg, OPT_DELIM);
+ end = strchr(arg, OPT_DELIM);
+ eqsign = strchr(arg, '=');
+ if (eqsign && eqsign < end)
+ end = NULL;
while(end != NULL) {
/*
* Copy the part of the option into the buffer and add the
/* Find the next option part delimiter. */
arg = end + 1;
- end = strchr(arg, OPT_DELIM);
+ end = strchr(arg, OPT_DELIM);
+ eqsign = strchr(arg, '=');
+ if (eqsign && eqsign < end)
+ end = NULL;
obstack_free(&obst, buf);
}