From 782f44b8fb07ec33cee148b2b6b4cf53024fe0cd Mon Sep 17 00:00:00 2001 From: Lysandros Nikolaou Date: Tue, 7 Jul 2020 01:42:21 +0300 Subject: [PATCH] bpo-41215: Make assertion in the new parser more strict (GH-21364) --- Parser/pegen.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Parser/pegen.c b/Parser/pegen.c index 42f9e0c41bf..e2cbf8ba246 100644 --- a/Parser/pegen.c +++ b/Parser/pegen.c @@ -525,7 +525,7 @@ _PyPegen_dummy_name(Parser *p, ...) static int _get_keyword_or_name_type(Parser *p, const char *name, int name_len) { - assert(name_len != 0); + assert(name_len > 0); if (name_len >= p->n_keyword_lists || p->keywords[name_len] == NULL || p->keywords[name_len]->type == -1) {