Skip to content

Commit edeaf61

Browse files
bpo-41215: Make assertion in the new parser more strict (GH-21364)
(cherry picked from commit 782f44b) Co-authored-by: Lysandros Nikolaou <[email protected]>
1 parent 6488a4a commit edeaf61

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Parser/pegen/pegen.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -525,7 +525,7 @@ _PyPegen_dummy_name(Parser *p, ...)
525525
static int
526526
_get_keyword_or_name_type(Parser *p, const char *name, int name_len)
527527
{
528-
assert(name_len != 0);
528+
assert(name_len > 0);
529529
if (name_len >= p->n_keyword_lists ||
530530
p->keywords[name_len] == NULL ||
531531
p->keywords[name_len]->type == -1) {

0 commit comments

Comments
 (0)