Dmitry Timoshkov : widl: Generate name for a tagless union.
Alexandre Julliard
julliard at winehq.org
Mon Feb 17 15:42:15 CST 2020
Module: wine
Branch: master
Commit: 8d0f8da652c7547af1348a06b1e690c1502eec30
URL: https://source.winehq.org/git/wine.git/?a=commit;h=8d0f8da652c7547af1348a06b1e690c1502eec30
Author: Dmitry Timoshkov <dmitry at baikal.ru>
Date: Fri Feb 14 20:56:12 2020 +0800
widl: Generate name for a tagless union.
Otherwise widl crashes while generating a typelib for
typedef struct _s
{
int type;
union
{
int field;
} u;
} s;
Signed-off-by: Dmitry Timoshkov <dmitry at baikal.ru>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
tools/widl/write_msft.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/tools/widl/write_msft.c b/tools/widl/write_msft.c
index 3a11d2ddd7..b70057eda1 100644
--- a/tools/widl/write_msft.c
+++ b/tools/widl/write_msft.c
@@ -2208,6 +2208,9 @@ static void add_union_typeinfo(msft_typelib_t *typelib, type_t *tunion)
if (-1 < tunion->typelib_idx)
return;
+ if (!tunion->name)
+ tunion->name = gen_name();
+
tunion->typelib_idx = typelib->typelib_header.nrtypeinfos;
msft_typeinfo = create_msft_typeinfo(typelib, TKIND_UNION, tunion->name, tunion->attrs);
msft_typeinfo->typeinfo->size = 0;
More information about the wine-cvs
mailing list