From 89e8cb50b60a3d57157c14774ce1c0912989648d Mon Sep 17 00:00:00 2001 From: midipix Date: Sun, 3 Jan 2016 12:13:47 -0500 Subject: argv.h: fix ARGV_OPTARG_OPTIONAL code path for long options. --- src/internal/argv/argv.h | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) (limited to 'src/internal') diff --git a/src/internal/argv/argv.h b/src/internal/argv/argv.h index d85cb2c..91212e7 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; -- cgit v1.2.3