From 5e6226729a380e35dc1a646b010d63697b8d4189 Mon Sep 17 00:00:00 2001 From: szdytom Date: Thu, 13 Jun 2024 22:23:23 +0800 Subject: [PATCH] skip nullptr in probe1 --- src/objects/dict.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/objects/dict.c b/src/objects/dict.c index 31da0e7a..29bbb3fb 100644 --- a/src/objects/dict.c +++ b/src/objects/dict.c @@ -91,6 +91,7 @@ static int pkpy_Dict__probe1(const pkpy_Dict* self, void* vm, pkpy_Var key, int6 if(idx == null) return h; struct pkpy_DictEntry* entry = &c11__getitem(struct pkpy_DictEntry, &self->_entries, idx); + if(pkpy_Var__is_null(&entry->key)) continue; if(entry->hash == hash && pkpy_Var__eq__(vm, entry->key, key)) return h; } PK_UNREACHABLE();