diff options
Diffstat (limited to 'parse-options.c')
-rw-r--r-- | parse-options.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/parse-options.c b/parse-options.c index 47a9192060..312a85dbde 100644 --- a/parse-options.c +++ b/parse-options.c @@ -110,6 +110,8 @@ static int get_value(struct parse_opt_ctx_t *p, return 0; case OPTION_COUNTUP: + if (*(int *)opt->value < 0) + *(int *)opt->value = 0; *(int *)opt->value = unset ? 0 : *(int *)opt->value + 1; return 0; |