From edeaf61b6827ab3a8673aff1fb7717917f08f003 Mon Sep 17 00:00:00 2001 From: "Miss Islington (bot)" <31488909+miss-islington@users.noreply.github.com> Date: Mon, 6 Jul 2020 16:35:10 -0700 Subject: bpo-41215: Make assertion in the new parser more strict (GH-21364) (cherry picked from commit 782f44b8fb07ec33cee148b2b6b4cf53024fe0cd) Co-authored-by: Lysandros Nikolaou --- Parser/pegen/pegen.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Parser/pegen/pegen.c b/Parser/pegen/pegen.c index 0f33dcb..beb2b2d 100644 --- a/Parser/pegen/pegen.c +++ b/Parser/pegen/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) { -- cgit v0.12