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

oldstable
Alexandre Julliard 2009-07-13 09:23:06 +02:00
parent 5622f74486
commit f21eab1101
1 changed files with 4 additions and 3 deletions

View File

@ -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;