bpo-41215: Make assertion in the new parser more strict (GH-21364)

This commit is contained in:
Lysandros Nikolaou 2020-07-07 01:42:21 +03:00 committed by GitHub
parent c2c1f1f906
commit 782f44b8fb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -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) {