diff options
Diffstat (limited to 'parse-options.c')
-rw-r--r-- | parse-options.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/parse-options.c b/parse-options.c index 987b015719..71a7acf4e2 100644 --- a/parse-options.c +++ b/parse-options.c @@ -22,7 +22,7 @@ static int get_arg(struct parse_opt_ctx_t *p, const struct option *opt, p->opt = NULL; } else if (p->argc == 1 && (opt->flags & PARSE_OPT_LASTARG_DEFAULT)) { *arg = (const char *)opt->defval; - } else if (p->argc) { + } else if (p->argc > 1) { p->argc--; *arg = *++p->argv; } else |