aboutsummaryrefslogtreecommitdiffstats
path: root/src/argparser.c
diff options
context:
space:
mode:
authorMattias Andrée <maandree@operamail.com>2013-08-23 15:46:56 +0200
committerMattias Andrée <maandree@operamail.com>2013-08-23 15:46:56 +0200
commit5c922f8cd34ea61522c289f10fd93a401d822eb5 (patch)
treea437eb3d6fbf0d459d0dce298fbb11264b6035ce /src/argparser.c
parentfix mem faults (diff)
downloadargparser-5c922f8cd34ea61522c289f10fd93a401d822eb5.tar.gz
argparser-5c922f8cd34ea61522c289f10fd93a401d822eb5.tar.bz2
argparser-5c922f8cd34ea61522c289f10fd93a401d822eb5.tar.xz
fix variadic issue
Signed-off-by: Mattias Andrée <maandree@operamail.com>
Diffstat (limited to 'src/argparser.c')
-rw-r--r--src/argparser.c5
1 files changed, 3 insertions, 2 deletions
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));