From f2368e455cb14eaedbc5c6eb423a1bdc48f258e3 Mon Sep 17 00:00:00 2001 From: Lysandros Nikolaou Date: Tue, 7 Jul 2020 01:20:16 +0300 Subject: [PATCH] bpo-41215: Make assertion in the new parser more strict --- Parser/pegen.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Parser/pegen.c b/Parser/pegen.c index 42f9e0c41bf498..e2cbf8ba2461ce 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) {