[Bug argparse/28081] getopt_long doesn't return error on ambiguous option

mlichvar at redhat dot com sourceware-bugzilla@sourceware.org
Mon Jul 19 07:48:08 GMT 2021


https://sourceware.org/bugzilla/show_bug.cgi?id=28081

--- Comment #5 from Miroslav Lichvar <mlichvar at redhat dot com> ---
FWIW, the getopt code checks also for a different flag, not just val and
has_arg. A minimal workaround, at least when the struct config is not
reallocated, is to point the flag to the val itself, e.g.

opts[i].flag = &opts[i].val;

-- 
You are receiving this mail because:
You are on the CC list for the bug.


More information about the Glibc-bugs mailing list