aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorgingerBill <bill@gingerbill.org>2024-07-09 15:29:36 +0100
committergingerBill <bill@gingerbill.org>2024-07-09 15:29:36 +0100
commitae2f16edeadf10589aa883bbe0a8496d0dd3eed1 (patch)
tree1dec4617e5ed43ca5180e728b7f58c7f0de44250 /src
parent9782d7b928a0aea4ed86f6a51ef8593bcc14fb7e (diff)
Fix #3894
Diffstat (limited to 'src')
-rw-r--r--src/check_type.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/check_type.cpp b/src/check_type.cpp
index 52c6f89ab..5323ea12d 100644
--- a/src/check_type.cpp
+++ b/src/check_type.cpp
@@ -1120,6 +1120,8 @@ gb_internal void check_bit_field_type(CheckerContext *ctx, Type *bit_field_type,
// NOTE(bill): it doesn't matter, and when it does,
// that api is absolutely stupid
return Endian_Unknown;
+ } else if (type_size_of(type) < 2) {
+ return Endian_Unknown;
} else if (is_type_endian_specific(type)) {
if (is_type_endian_little(type)) {
return Endian_Little;