widl: Fix a SEGV when using arrays declared using a pointer and

attributes, instead of array indices (reported by Eric Kohl).
This commit is contained in:
Robert Shearman 2006-02-01 12:29:23 +01:00 committed by Alexandre Julliard
parent ebc65aea8d
commit 0d4e1bc336
1 changed files with 3 additions and 3 deletions

View File

@ -639,7 +639,7 @@ static size_t write_array_tfs(FILE *file, const attr_t *attrs,
/* FIXME: need to analyse type for pointers */ /* FIXME: need to analyse type for pointers */
if (NEXT_LINK(array)) /* multi-dimensional array */ if (array && NEXT_LINK(array)) /* multi-dimensional array */
{ {
error("write_array_tfs: Multi-dimensional arrays not implemented yet (param %s)\n", name); error("write_array_tfs: Multi-dimensional arrays not implemented yet (param %s)\n", name);
return 0; return 0;
@ -1170,7 +1170,7 @@ void marshall_arguments(FILE *file, int indent, func_t *func,
int has_length = length_is && (length_is->type != EXPR_VOID); int has_length = length_is && (length_is->type != EXPR_VOID);
int has_size = (size_is && (size_is->type != EXPR_VOID)) || !var->array->is_const; int has_size = (size_is && (size_is->type != EXPR_VOID)) || !var->array->is_const;
if (NEXT_LINK(var->array)) /* multi-dimensional array */ if (var->array && NEXT_LINK(var->array)) /* multi-dimensional array */
array_type = "ComplexArray"; array_type = "ComplexArray";
else else
{ {
@ -1364,7 +1364,7 @@ void unmarshall_arguments(FILE *file, int indent, func_t *func,
int has_length = length_is && (length_is->type != EXPR_VOID); int has_length = length_is && (length_is->type != EXPR_VOID);
int has_size = (size_is && (size_is->type != EXPR_VOID)) || !var->array->is_const; int has_size = (size_is && (size_is->type != EXPR_VOID)) || !var->array->is_const;
if (NEXT_LINK(var->array)) /* multi-dimensional array */ if (var->array && NEXT_LINK(var->array)) /* multi-dimensional array */
array_type = "ComplexArray"; array_type = "ComplexArray";
else else
{ {