Zebediah Figura : widl: Size of an encapsulated union doesn' t include the tag.
Alexandre Julliard
julliard at winehq.org
Thu Apr 12 15:28:14 CDT 2018
Module: wine
Branch: master
Commit: 947ff4ba46ff140afd3deccbb3de304778cda723
URL: https://source.winehq.org/git/wine.git/?a=commit;h=947ff4ba46ff140afd3deccbb3de304778cda723
Author: Zebediah Figura <z.figura12 at gmail.com>
Date: Tue Apr 10 20:30:29 2018 -0500
widl: Size of an encapsulated union doesn't include the tag.
Signed-off-by: Zebediah Figura <z.figura12 at gmail.com>
Signed-off-by: Huw Davies <huw at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
tools/widl/typegen.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/tools/widl/typegen.c b/tools/widl/typegen.c
index 27855cc..9f62589 100644
--- a/tools/widl/typegen.c
+++ b/tools/widl/typegen.c
@@ -3248,6 +3248,7 @@ static unsigned int write_union_tfs(FILE *file, const attr_list_t *attrs,
unsigned int nbranch = 0;
type_t *deftype = NULL;
short nodeftype = 0xffff;
+ unsigned int dummy;
var_t *f;
if (processed(type) &&
@@ -3256,10 +3257,10 @@ static unsigned int write_union_tfs(FILE *file, const attr_list_t *attrs,
guard_rec(type);
- size = type_memsize(type);
-
fields = type_union_get_cases(type);
+ size = union_memsize(fields, &dummy);
+
if (fields) LIST_FOR_EACH_ENTRY(f, fields, var_t, entry)
{
expr_list_t *cases = get_attrp(f->attrs, ATTR_CASE);
More information about the wine-cvs
mailing list