aboutsummaryrefslogtreecommitdiff
path: root/types.c
diff options
context:
space:
mode:
Diffstat (limited to 'types.c')
-rw-r--r--types.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/types.c b/types.c
index 17009f9e..a0e347ca 100644
--- a/types.c
+++ b/types.c
@@ -431,7 +431,7 @@ PUREFUNC size_t type_size(type_t *t)
type_t *nonnull = Match(t, OptionalType)->type;
switch (nonnull->tag) {
case IntType:
- switch (Match(t, IntType)->bits) {
+ switch (Match(nonnull, IntType)->bits) {
case TYPE_IBITS64: return sizeof(OptionalInt64_t);
case TYPE_IBITS32: return sizeof(OptionalInt32_t);
case TYPE_IBITS16: return sizeof(OptionalInt16_t);
@@ -511,7 +511,7 @@ PUREFUNC size_t type_align(type_t *t)
type_t *nonnull = Match(t, OptionalType)->type;
switch (nonnull->tag) {
case IntType:
- switch (Match(t, IntType)->bits) {
+ switch (Match(nonnull, IntType)->bits) {
case TYPE_IBITS64: return __alignof__(OptionalInt64_t);
case TYPE_IBITS32: return __alignof__(OptionalInt32_t);
case TYPE_IBITS16: return __alignof__(OptionalInt16_t);