From: Lysandros Nikolaou Date: Mon, 6 Jul 2020 22:42:21 +0000 (+0300) Subject: bpo-41215: Make assertion in the new parser more strict (GH-21364) X-Git-Tag: v3.10.0a1~430 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=782f44b8fb07ec33cee148b2b6b4cf53024fe0cd;p=thirdparty%2FPython%2Fcpython.git bpo-41215: Make assertion in the new parser more strict (GH-21364) --- diff --git a/Parser/pegen.c b/Parser/pegen.c index 42f9e0c41bf4..e2cbf8ba2461 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) {