diff options
| author | gingerBill <bill@gingerbill.org> | 2022-11-08 11:42:42 +0000 |
|---|---|---|
| committer | gingerBill <bill@gingerbill.org> | 2022-11-08 11:42:42 +0000 |
| commit | d77269dee2abe3104df0c36bdffe157a079bec7c (patch) | |
| tree | aea29b2c262dc27a9d94c6cf976154a692785a1b | |
| parent | ea263b8cc55cdfbec38dcd6bf64e9cc3fee22fb0 (diff) | |
Disallow zero sized map keys
| -rw-r--r-- | src/types.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/types.cpp b/src/types.cpp index 9b2fd30d4..c92d8a78f 100644 --- a/src/types.cpp +++ b/src/types.cpp @@ -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) { |