diff --git a/tools/witx/src/layout.rs b/tools/witx/src/layout.rs index ca5457ec..506cec03 100644 --- a/tools/witx/src/layout.rs +++ b/tools/witx/src/layout.rs @@ -148,6 +148,7 @@ impl UnionDatatype { .map(|sa| sa.align) .max() .expect("nonzero variants"); + let size = align_to(size, align); SizeAlign { size, align } } }