summaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authormidipix <writeonce@midipix.org>2018-05-23 00:33:26 +0000
committermidipix <writeonce@midipix.org>2018-05-22 23:57:03 -0400
commit8764ae2aad4aa82f49a9b384eae4f61fecfe25c6 (patch)
tree1ecfcf061099f3b5487d64f132dc92cb25f95163 /src
parent3396d5106b1a441e93d4b6351721a7b51caf791f (diff)
downloadapimagic-8764ae2aad4aa82f49a9b384eae4f61fecfe25c6.tar.bz2
apimagic-8764ae2aad4aa82f49a9b384eae4f61fecfe25c6.tar.xz
argv: argv_scan(): properly handle optional argument values of short options.
Diffstat (limited to 'src')
-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 de05c70..c87ae4c 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;
}