summaryrefslogtreecommitdiff
path: root/6
diff options
context:
space:
mode:
authorOri Bernstein <ori@markovcorp.com>2019-01-28 16:00:57 -0800
committerOri Bernstein <ori@markovcorp.com>2019-01-28 16:00:57 -0800
commitd04ab76586db2d3db88273090c22f4160c4a94a0 (patch)
tree269b83793fada1076376178ec87626b791c27c80 /6
parentd975956a1a2a1b05e328247fc0f5ca841edc8e18 (diff)
downloadmc-d04ab76586db2d3db88273090c22f4160c4a94a0.tar.gz
Missed type alignment for slices.
Holy crap, how did this work until now.
Diffstat (limited to '6')
-rw-r--r--6/typeinfo.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/6/typeinfo.c b/6/typeinfo.c
index 0a7045b..c7bed27 100644
--- a/6/typeinfo.c
+++ b/6/typeinfo.c
@@ -343,6 +343,9 @@ tyalign(Type *ty)
for (i = 0; i < ty->nmemb; i++)
align = max(align, tyalign(decltype(ty->sdecls[i])));
break;
+ case Tyslice:
+ align = 8;
+ break;
default:
align = max(align, tysize(ty));
}