Skip to content

Commit

Permalink
Fix assertion
Browse files Browse the repository at this point in the history
  • Loading branch information
colesbury committed Jan 17, 2025
1 parent 5be6d2f commit 12f8a95
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Python/uniqueid.c
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ _PyObject_ReleaseUniqueId(Py_ssize_t unique_id)
struct _Py_unique_id_pool *pool = &interp->unique_ids;

LOCK_POOL(pool);
assert(unique_id > 0 && unique_id < pool->size);
assert(unique_id > 0 && unique_id <= pool->size);
Py_ssize_t idx = unique_id - 1;
_Py_unique_id_entry *entry = &pool->table[idx];
entry->next = pool->freelist;
Expand Down

0 comments on commit 12f8a95

Please sign in to comment.