X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=ir%2Flibcore%2Flc_opts.c;h=8d0868df4b963e596bcb736794b7bb4d5040c634;hb=20eeb0eec8a216005fce59f005fc301779e42cdf;hp=4cb52df539c15289993ba3fe6f39495c0e94aa9c;hpb=d3f254f3d57f0a9cc57621d46e7179c88a443f67;p=libfirm diff --git a/ir/libcore/lc_opts.c b/ir/libcore/lc_opts.c index 4cb52df53..8d0868df4 100644 --- a/ir/libcore/lc_opts.c +++ b/ir/libcore/lc_opts.c @@ -726,7 +726,7 @@ int lc_opt_from_single_arg(const lc_opt_entry_t *root, 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; @@ -756,7 +756,10 @@ int lc_opt_from_single_arg(const lc_opt_entry_t *root, /* 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 @@ -772,7 +775,10 @@ int lc_opt_from_single_arg(const lc_opt_entry_t *root, /* 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); }