fx.collections: hashtable: add bounds checking to iterator

This commit is contained in:
2026-06-13 14:49:44 +01:00
parent 87ff913186
commit f6320d64cd
+4
View File
@@ -623,6 +623,10 @@ static const fx_value *iterator_get_value(const fx_iterator *obj)
struct table_item *table = it->_h_p->t_items;
size_t capacity = primes[it->_h_p->t_max_index];
if (it->i >= capacity) {
return NULL;
}
if (table[it->i].i_item) {
return &it->item_value;
}