]> asedeno.scripts.mit.edu Git - git.git/blobdiff - parse-options.c
Merge branch 'rs/archive-parse-options'
[git.git] / parse-options.c
index 987b0157192b9fe4c7451d94f5948bdbd7f524bb..71a7acf4e22bd12c0919f277410d6ec52dd5efc8 100644 (file)
@@ -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