diff options
author | midipix <writeonce@midipix.org> | 2016-01-03 12:12:44 -0500 |
---|---|---|
committer | midipix <writeonce@midipix.org> | 2016-11-10 23:35:35 -0500 |
commit | 28ba08aa98a062f938ccc509622fabd0d01c7e6a (patch) | |
tree | 6c7bab50626bd4d16db91c9a6e305ab44c28dd61 /src | |
parent | 43055f6d2c6d1d4243a66371b9bf7a0bf79ab0e0 (diff) | |
download | perk-28ba08aa98a062f938ccc509622fabd0d01c7e6a.tar.bz2 perk-28ba08aa98a062f938ccc509622fabd0d01c7e6a.tar.xz |
argv.h: fix ARGV_OPTARG_OPTIONAL code path for long options.
Diffstat (limited to 'src')
-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 5f8b4f1..dff42d5 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; |