Disallow zero sized map keys

This commit is contained in:
gingerBill
2022-11-08 11:42:42 +00:00
parent ea263b8cc5
commit d77269dee2

View File

@@ -1921,7 +1921,7 @@ bool is_type_valid_for_keys(Type *t) {
if (is_type_untyped(t)) {
return false;
}
return is_type_comparable(t);
return type_size_of(t) > 0 && is_type_comparable(t);
}
bool is_type_valid_bit_set_elem(Type *t) {