dumpfile.c (opt_info_switch_p_1): Ignore '-' if it appears after '='.

* dumpfile.c (opt_info_switch_p_1): Ignore '-' if it appears
	after '='.

From-SVN: r268380
This commit is contained in:
Ulrich Drepper 2019-01-30 07:18:22 +00:00 committed by Ulrich Drepper
parent 6aa238a135
commit 2ab6839bcc
2 changed files with 7 additions and 3 deletions

View file

@ -1,3 +1,8 @@
2019-01-30 Ulrich Drepper <drepper@redhat.com>
* dumpfile.c (opt_info_switch_p_1): Ignore '-' if it appears
after '='.
2019-01-29 Martin Sebor <msebor@redhat.com>
PR c/88956

View file

@ -1915,10 +1915,9 @@ opt_info_switch_p_1 (const char *arg, dump_flags_t *flags,
end_ptr = strchr (ptr, '-');
eq_ptr = strchr (ptr, '=');
if (eq_ptr && !end_ptr)
if (eq_ptr && (!end_ptr || eq_ptr < end_ptr))
end_ptr = eq_ptr;
if (!end_ptr)
else if (!end_ptr)
end_ptr = ptr + strlen (ptr);
length = end_ptr - ptr;