diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/misc/getopt_long.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/misc/getopt_long.c b/src/misc/getopt_long.c index 480c0013..c6e14625 100644 --- a/src/misc/getopt_long.c +++ b/src/misc/getopt_long.c @@ -53,7 +53,7 @@ static int __getopt_long_core(int argc, char *const *argv, const char *optstring { optarg = 0; if (longopts && argv[optind][0] == '-' && - ((longonly && argv[optind][1]) || + ((longonly && argv[optind][1] && argv[optind][1] != '-') || (argv[optind][1] == '-' && argv[optind][2]))) { int colon = optstring[optstring[0]=='+'||optstring[0]=='-']==':'; |