widl: Fix pointer detection for structures with embedded arrays. Pointers have priority over every other type, so move the detection to the top of get_struct_type. Fall through from the embedded array detection to the embedded structure handling code so that conformance, variance and pointer presence is inherited from the array's base type.
diff --git a/tools/widl/parser.y b/tools/widl/parser.y index 15f1367..499f0f4 100644 --- a/tools/widl/parser.y +++ b/tools/widl/parser.y
@@ -1280,14 +1280,20 @@ while( (t->type == 0) && t->ref ) t = t->ref; - if (is_string_type(field->attrs, field->ptr_level, field->array)) + if (field->ptr_level > 0) + { + has_pointer = 1; + continue; + } + + if (is_string_type(field->attrs, 0, field->array)) { has_conformance = 1; has_variance = 1; continue; } - if (is_array_type(field->attrs, field->ptr_level, field->array)) + if (is_array_type(field->attrs, 0, field->array)) { if (field->array && !field->array->is_const) { @@ -1298,13 +1304,6 @@ } if (is_attr(field->attrs, ATTR_LENGTHIS)) has_variance = 1; - continue; - } - - if (field->ptr_level > 0) - { - has_pointer = 1; - continue; } switch (t->type)