From 3ce6c15a81976b9fcb42ea6df873e08c3d691a86 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adrien=20Gallou=C3=ABt?= Date: Sat, 27 Jan 2018 16:30:49 +0000 Subject: [PATCH] Use -- to stop suboptions MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Adrien Gallouët --- src/option.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/option.c b/src/option.c index ec4baed..c973a80 100644 --- a/src/option.c +++ b/src/option.c @@ -61,6 +61,9 @@ option_option(void *data, int argc, char **argv) opts[k].set = 0; for (int i = 1; i < argc; i++) { + if (!str_cmp(argv[i], "--")) + return i; + int found = 0; for (int k = 0; opts[k].name; k++) {