commit 0fc74e86b3ee2c559408a276f955b4c6f6cae0e3
parent b96aea9a37ba479045816177108865ca3320a318
Author: Drew DeVault <sir@cmpwn.com>
Date: Sun, 24 Jan 2021 09:53:28 -0500
type store: fix align of tags of zero-length types
Diffstat:
1 file changed, 4 insertions(+), 0 deletions(-)
diff --git a/src/type_store.c b/src/type_store.c
@@ -563,6 +563,10 @@ tagged_init_from_atype(struct type_store *store,
next = &tu[i]->next;
}
+ if (type->align == 0) {
+ type->align = builtin_type_uint.align;
+ }
+
type->size += builtin_type_uint.size % type->align
+ builtin_type_uint.align;
if (type->align < builtin_type_uint.align) {