Commit 66f46f81 authored by Zebediah Figura's avatar Zebediah Figura Committed by Alexandre Julliard

widl: Correctly handle conformant arrays in clear_output_vars().

parent 4ed823ff
......@@ -110,7 +110,13 @@ static void clear_output_vars( const var_list_t *args )
if (type_get_type(type_pointer_get_ref(arg->type)) == TYPE_BASIC) continue;
if (type_get_type(type_pointer_get_ref(arg->type)) == TYPE_ENUM) continue;
}
print_proxy( "if (%s) MIDL_memset( %s, 0, sizeof( *%s ));\n", arg->name, arg->name, arg->name );
print_proxy( "if (%s) MIDL_memset( %s, 0, ", arg->name, arg->name );
if (is_array(arg->type) && type_array_has_conformance(arg->type))
{
write_expr( proxy, type_array_get_conformance(arg->type), 1, 1, NULL, NULL, "" );
fprintf( proxy, " * " );
}
fprintf( proxy, "sizeof( *%s ));\n", arg->name );
}
}
......
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