From 5b9bfbbb8caa5a7ef849247f1dabc100e46d4464 Mon Sep 17 00:00:00 2001 From: Tavian Barnes Date: Tue, 25 Feb 2020 11:07:50 -0500 Subject: parse: Don't return success for invalid parse_int() calls with -DNDEBUG --- parse.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/parse.c b/parse.c index 509d835..55a903c 100644 --- a/parse.c +++ b/parse.c @@ -623,7 +623,7 @@ static const char *parse_int(const struct parser_state *state, const char *str, default: assert(false); - break; + goto bad; } return endptr; @@ -2269,7 +2269,7 @@ fail_list_strategies: } /** - * Parse -[aBc]?since. + * Parse -[aBcm]?since. */ static struct expr *parse_since(struct parser_state *state, int field, int arg2) { struct expr *expr = parse_unary_test(state, eval_newer); -- cgit v1.2.3