Commit f21eab11 authored by Alexandre Julliard's avatar Alexandre Julliard

widl: Take into account the alignment of conformant arrays to pad a structure.

parent 5622f744
......@@ -2208,11 +2208,12 @@ static void write_struct_members(FILE *file, const type_t *type,
if (fields) LIST_FOR_EACH_ENTRY( field, fields, const var_t, entry )
{
type_t *ft = field->type;
unsigned int align = 0;
unsigned int size = type_memsize(ft, &align);
if (salign < align) salign = align;
if (!is_conformant_array(ft) || type_array_is_decl_as_ptr(ft))
{
unsigned int align = 0;
unsigned int size = type_memsize(ft, &align);
if (salign < align) salign = align;
if ((align - 1) & offset)
{
unsigned char fc = 0;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment