diff options
author | midipix <writeonce@midipix.org> | 2016-01-03 12:08:50 -0500 |
---|---|---|
committer | midipix <writeonce@midipix.org> | 2016-01-03 12:08:50 -0500 |
commit | 6fbd83152cce99f7bcebb4102d881995901de6ad (patch) | |
tree | 0ebd65dd7f40f8b1954aa870fa3565968e527741 /src/internal/argv | |
parent | 81c190921065d94a4218a4ffde9457612acb504f (diff) | |
download | apimagic-6fbd83152cce99f7bcebb4102d881995901de6ad.tar.bz2 apimagic-6fbd83152cce99f7bcebb4102d881995901de6ad.tar.xz |
argv.h: fix ARGV_OPTARG_OPTIONAL code path for long options.
Diffstat (limited to 'src/internal/argv')
-rw-r--r-- | src/internal/argv/argv.h | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/src/internal/argv/argv.h b/src/internal/argv/argv.h index c15cc98..8d8e50c 100644 --- a/src/internal/argv/argv.h +++ b/src/internal/argv/argv.h @@ -391,16 +391,7 @@ static void argv_scan( fval = true; } else { /* ARGV_OPTARG_OPTIONAL */ - if (!val[0] && !*parg) - fval = false; - else if (*parg && is_short_option(*parg)) - fval = false; - else if (*parg && is_long_option(*parg)) - fval = false; - else if (*parg && is_last_option(*parg)) - fval = false; - else - fval = *parg; + fval = val[0]; } } else ferror = ARGV_ERROR_LONG_OPTION; |