summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authormidipix <writeonce@midipix.org>2018-05-23 00:33:26 +0000
committermidipix <writeonce@midipix.org>2018-05-22 23:49:12 -0400
commitf74847de24b8ef2f4eb56bf3c20554dd40969d7a (patch)
tree1e5cf2bc145f82cb3f67eb84e9d3dede25b8e585
parent7deda55512cec1a0f039d816b5d8c7371c3fc308 (diff)
downloadntux-f74847de24b8ef2f4eb56bf3c20554dd40969d7a.tar.bz2
ntux-f74847de24b8ef2f4eb56bf3c20554dd40969d7a.tar.xz
argv: argv_scan(): properly handle optional argument values of short options.
-rw-r--r--src/internal/argv/argv.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/internal/argv/argv.h b/src/internal/argv/argv.h
index 8bb3eae..b87e8ce 100644
--- a/src/internal/argv/argv.h
+++ b/src/internal/argv/argv.h
@@ -380,6 +380,8 @@ static void argv_scan(
fval = false;
else if (ch && is_last_option(ch))
fval = false;
+ else if (fnext)
+ fval = false;
else
fval = ch;
}