Skip to content

Commit 5158f0f

Browse files
Pat Hickeypchickey
authored andcommitted
witx layout: fix calculation of union size
1 parent 448bd07 commit 5158f0f

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

tools/witx/src/layout.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -148,6 +148,7 @@ impl UnionDatatype {
148148
.map(|sa| sa.align)
149149
.max()
150150
.expect("nonzero variants");
151+
let size = align_to(size, align);
151152
SizeAlign { size, align }
152153
}
153154
}

0 commit comments

Comments
 (0)