aboutsummaryrefslogtreecommitdiff
path: root/src/type.cff
diff options
context:
space:
mode:
authorlemon <lsof@mailbox.org>2022-08-26 09:03:00 +0200
committerlemon <lsof@mailbox.org>2022-08-26 09:03:00 +0200
commit03f945e9feb08e4525b5b73a4aec81ef11b04f7f (patch)
tree41b8e556f25281c5a3b46c9e9f6228aed386da7b /src/type.cff
parentd08e43f70d7482543c9bb2ba548bcd31e7eba978 (diff)
vararg promote array->ptr
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);