widl: Size of an encapsulated union doesn't include the tag.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com> Signed-off-by: Huw Davies <huw@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
c3ebd20283
commit
947ff4ba46
|
@ -3248,6 +3248,7 @@ static unsigned int write_union_tfs(FILE *file, const attr_list_t *attrs,
|
||||||
unsigned int nbranch = 0;
|
unsigned int nbranch = 0;
|
||||||
type_t *deftype = NULL;
|
type_t *deftype = NULL;
|
||||||
short nodeftype = 0xffff;
|
short nodeftype = 0xffff;
|
||||||
|
unsigned int dummy;
|
||||||
var_t *f;
|
var_t *f;
|
||||||
|
|
||||||
if (processed(type) &&
|
if (processed(type) &&
|
||||||
|
@ -3256,10 +3257,10 @@ static unsigned int write_union_tfs(FILE *file, const attr_list_t *attrs,
|
||||||
|
|
||||||
guard_rec(type);
|
guard_rec(type);
|
||||||
|
|
||||||
size = type_memsize(type);
|
|
||||||
|
|
||||||
fields = type_union_get_cases(type);
|
fields = type_union_get_cases(type);
|
||||||
|
|
||||||
|
size = union_memsize(fields, &dummy);
|
||||||
|
|
||||||
if (fields) LIST_FOR_EACH_ENTRY(f, fields, var_t, entry)
|
if (fields) LIST_FOR_EACH_ENTRY(f, fields, var_t, entry)
|
||||||
{
|
{
|
||||||
expr_list_t *cases = get_attrp(f->attrs, ATTR_CASE);
|
expr_list_t *cases = get_attrp(f->attrs, ATTR_CASE);
|
||||||
|
|
Loading…
Reference in New Issue