Commit 323cff8f authored by Alexandre Julliard's avatar Alexandre Julliard

widl: Fix correlation offset for unencapsulated unions in interpreted mode.

parent dc8395f2
...@@ -2618,7 +2618,7 @@ static void write_member_type(FILE *file, const type_t *cont, ...@@ -2618,7 +2618,7 @@ static void write_member_type(FILE *file, const type_t *cont,
if (type_get_type(type) == TYPE_UNION && is_attr(attrs, ATTR_SWITCHIS)) if (type_get_type(type) == TYPE_UNION && is_attr(attrs, ATTR_SWITCHIS))
{ {
absoff = *corroff; absoff = *corroff;
*corroff += 8; *corroff += interpreted_mode ? 10 : 8;
} }
else else
{ {
...@@ -2708,7 +2708,7 @@ static void write_descriptors(FILE *file, type_t *type, unsigned int *tfsoff) ...@@ -2708,7 +2708,7 @@ static void write_descriptors(FILE *file, type_t *type, unsigned int *tfsoff)
if (!fc) fc = FC_LONG; if (!fc) fc = FC_LONG;
if (is_attr(ft->attrs, ATTR_SWITCHTYPE)) if (is_attr(ft->attrs, ATTR_SWITCHTYPE))
absoff += 8; /* we already have a corr descr, skip it */ absoff += interpreted_mode ? 10 : 8; /* we already have a corr descr, skip it */
print_file(file, 0, "/* %d */\n", *tfsoff); print_file(file, 0, "/* %d */\n", *tfsoff);
print_file(file, 2, "0x%x,\t/* FC_NON_ENCAPSULATED_UNION */\n", FC_NON_ENCAPSULATED_UNION); print_file(file, 2, "0x%x,\t/* FC_NON_ENCAPSULATED_UNION */\n", FC_NON_ENCAPSULATED_UNION);
print_file(file, 2, "0x%x,\t/* %s */\n", fc, string_of_type(fc)); print_file(file, 2, "0x%x,\t/* %s */\n", fc, string_of_type(fc));
......
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