summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTavian Barnes <tavianator@tavianator.com>2016-09-04 14:28:49 -0400
committerTavian Barnes <tavianator@tavianator.com>2016-09-04 14:28:49 -0400
commitae2c1dcdcdd585ae8f14b43200fb4143606eb5eb (patch)
tree18cda1300430580ec4f88d2d3680d4bd4388c4f7
parent3cce36f24f02146986c11cd9ef6381e36952f866 (diff)
downloadbfs-ae2c1dcdcdd585ae8f14b43200fb4143606eb5eb.tar.xz
Require -{min,max}depth argument to be positive.
-rw-r--r--parse.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/parse.c b/parse.c
index b8f79ad..f4491e9 100644
--- a/parse.c
+++ b/parse.c
@@ -801,7 +801,7 @@ static struct expr *parse_depth_limit(struct parser_state *state, int is_min, in
}
int *depth = is_min ? &cmdline->mindepth : &cmdline->maxdepth;
- if (!parse_int(state, value, depth, IF_INT)) {
+ if (!parse_int(state, value, depth, IF_INT | IF_UNSIGNED)) {
return NULL;
}