mirror of
https://github.com/pocketpy/pocketpy
synced 2025-10-20 19:40:18 +00:00
skip nullptr in probe1
This commit is contained in:
parent
41562cf4c3
commit
5e6226729a
@ -91,6 +91,7 @@ static int pkpy_Dict__probe1(const pkpy_Dict* self, void* vm, pkpy_Var key, int6
|
|||||||
if(idx == null) return h;
|
if(idx == null) return h;
|
||||||
|
|
||||||
struct pkpy_DictEntry* entry = &c11__getitem(struct pkpy_DictEntry, &self->_entries, idx);
|
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;
|
if(entry->hash == hash && pkpy_Var__eq__(vm, entry->key, key)) return h;
|
||||||
}
|
}
|
||||||
PK_UNREACHABLE();
|
PK_UNREACHABLE();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user