aboutsummaryrefslogtreecommitdiff
path: root/src/type.cff
diff options
context:
space:
mode:
Diffstat (limited to 'src/type.cff')
-rw-r--r--src/type.cff2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/type.cff b/src/type.cff
index c0fe157..214bda8 100644
--- a/src/type.cff
+++ b/src/type.cff
@@ -119,7 +119,7 @@ struct TypeTraits {
static types_set Set<*const Type, TypeTraits> = {};
extern fn interntype(ty0 Type) *const Type {
if ty0.align == 0 {
- ty0.align = ty0.size;
+ ty0.align = ty0.size == 0 ? 1 : ty0.size;
}
return *types_set->intern(&ty0);