~jojo/Carth

fa1fab18f6472c664a9b15b61398402bd1bf5c7a — JoJo 1 year, 10 months ago e742f2d
Fix struct member padding set to alignment when remainder = 0
1 files changed, 1 insertions(+), 1 deletions(-)

M src/Codegen.hs
M src/Codegen.hs => src/Codegen.hs +1 -1
@@ 1010,7 1010,7 @@ sizeof = \case
    toBytesCeil nbits = div (nbits + 7) 8
    addMember accSize u = do
        align <- alignmentof u
        let padding = align - mod accSize align
        let padding = mod (align - accSize) align
        size <- sizeof u
        pure (accSize + padding + size)