From 5c922f8cd34ea61522c289f10fd93a401d822eb5 Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Fri, 23 Aug 2013 15:46:56 +0200 Subject: fix variadic issue MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- src/argparser.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/argparser.c b/src/argparser.c index 4c980a9..b15f499 100644 --- a/src/argparser.c +++ b/src/argparser.c @@ -1329,6 +1329,7 @@ long args_parse(int argc, char** argv) { dashed = true; *(optqueue + optptr++) = arg; + *(argqueue + argptr++) = null; args_optmap_trigger(arg, null); } else @@ -1412,9 +1413,9 @@ long args_parse(int argc, char** argv) if (args_options_get_type(i) == VARIADIC) { char* std = args_options_get_standard(i); - if (args_opts_contains(std)) + if (args_opts_used(std)) { - if (args_opts_get(std) == null) + if (*(args_opts_get(std)) == null) args_opts_clear(std); for (j = 0; j < args_files_count; j++) args_opts_append(std, *(args_files + j)); -- cgit v1.2.3-70-g09d2