Commit 2c501aa7 authored by Dmitry Timoshkov's avatar Dmitry Timoshkov Committed by Alexandre Julliard

widl: If a variable doesn't have a name provide an autogenerated one.

Otherwise widl crashes while generating a typelib for a structure with an embedded anonymous union: typedef struct _s { int type; union { int f; }; } s; Signed-off-by: 's avatarDmitry Timoshkov <dmitry@baikal.ru> Signed-off-by: 's avatarAlexandre Julliard <julliard@winehq.org>
parent 8d0f8da6
......@@ -1630,6 +1630,9 @@ static HRESULT add_var_desc(msft_typeinfo_t *typeinfo, UINT index, var_t* var)
unsigned char *namedata;
int var_num = (typeinfo->typeinfo->cElement >> 16) & 0xffff;
if (!var->name)
var->name = gen_name();
chat("add_var_desc(%d, %s)\n", index, var->name);
id = 0x40000000 + index;
......
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