diff --git a/tools/widl/header.c b/tools/widl/header.c index c04222b93e7..971b30fc543 100644 --- a/tools/widl/header.c +++ b/tools/widl/header.c @@ -250,6 +250,7 @@ void write_type_left(FILE *h, type_t *t) case RPC_FC_OP: case RPC_FC_CARRAY: case RPC_FC_CVARRAY: + case RPC_FC_BOGUS_ARRAY: write_type_left(h, t->ref); fprintf(h, "%s*", needs_space_after(t->ref) ? " " : ""); break; diff --git a/tools/widl/parser.y b/tools/widl/parser.y index cc5aca52b83..ac2403844f0 100644 --- a/tools/widl/parser.y +++ b/tools/widl/parser.y @@ -1363,6 +1363,10 @@ static void set_type(var_t *v, type_t *type, int ptr_level, array_dims_t *arr) (*ptype)->type = RPC_FC_BOGUS_ARRAY; } } + + /* if the structure is complex, then so must be the encompassing array */ + if (is_array(v->type) && (v->type->ref->type == RPC_FC_BOGUS_STRUCT)) + v->type->type = RPC_FC_BOGUS_ARRAY; } static ifref_list_t *append_ifref(ifref_list_t *list, ifref_t *iface) @@ -1812,6 +1816,7 @@ static int get_struct_type(var_list_t *fields) case RPC_FC_PAD: case RPC_FC_EMBEDDED_COMPLEX: case RPC_FC_BOGUS_STRUCT: + case RPC_FC_BOGUS_ARRAY: return RPC_FC_BOGUS_STRUCT; } }