Commit 4b322c6e4ea4f76c65e46768cc9eada30c7e7c3f

Thomas de Grivel 2024-08-03T11:00:48

fix struct alignment

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
diff --git a/libkc3/struct_type.c b/libkc3/struct_type.c
index 1dfec05..de59de2 100644
--- a/libkc3/struct_type.c
+++ b/libkc3/struct_type.c
@@ -231,9 +231,7 @@ s_struct_type * struct_type_new (const s_sym *module,
 uw struct_type_padding (uw offset, uw size)
 {
   unsigned int align = 1;
-  if (size >= 16)
-    align = 16;
-  else if (size >= 8)
+  if (size >= 8)
     align = 8;
   return (offset + align - 1) / align * align;
 }