From 860e3ebb1d47af33a2c07c14aacf6d3f74e12068 Mon Sep 17 00:00:00 2001 From: Bill Currie Date: Sun, 24 Feb 2002 01:11:34 +0000 Subject: [PATCH] make unsigned arrays/pointers more useful by allowing them to be used as unbounded arrays --- tools/qfcc/source/expr.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tools/qfcc/source/expr.c b/tools/qfcc/source/expr.c index bc14c8ce0..ddbb5008c 100644 --- a/tools/qfcc/source/expr.c +++ b/tools/qfcc/source/expr.c @@ -1619,8 +1619,9 @@ array_expr (expr_t *array, expr_t *index) return error (array, "not an array"); if (index_type != &type_integer && index_type != &type_uinteger) return error (index, "invalid array index type"); - if (index->type >= ex_integer && - index->e.uinteger_val >= array_type->num_parms) + if (array_type->num_parms + && index->type >= ex_integer + && index->e.uinteger_val >= array_type->num_parms) return error (index, "array index out of bounds"); size = PR_GetTypeSize (array_type->aux_type); if (size > 1) {