skip nullptr in probe1

This commit is contained in:
方而静 2024-06-13 22:23:23 +08:00
parent 41562cf4c3
commit 5e6226729a

View File

@ -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();