Commit 8d0f8da6 authored by Dmitry Timoshkov's avatar Dmitry Timoshkov Committed by Alexandre Julliard

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: 's avatarDmitry Timoshkov <dmitry@baikal.ru> Signed-off-by: 's avatarAlexandre Julliard <julliard@winehq.org>
parent 2b9d720e
...@@ -2208,6 +2208,9 @@ static void add_union_typeinfo(msft_typelib_t *typelib, type_t *tunion) ...@@ -2208,6 +2208,9 @@ static void add_union_typeinfo(msft_typelib_t *typelib, type_t *tunion)
if (-1 < tunion->typelib_idx) if (-1 < tunion->typelib_idx)
return; return;
if (!tunion->name)
tunion->name = gen_name();
tunion->typelib_idx = typelib->typelib_header.nrtypeinfos; tunion->typelib_idx = typelib->typelib_header.nrtypeinfos;
msft_typeinfo = create_msft_typeinfo(typelib, TKIND_UNION, tunion->name, tunion->attrs); msft_typeinfo = create_msft_typeinfo(typelib, TKIND_UNION, tunion->name, tunion->attrs);
msft_typeinfo->typeinfo->size = 0; msft_typeinfo->typeinfo->size = 0;
......
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