mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-10 23:32:09 +00:00
make unsigned arrays/pointers more useful by allowing them to be used as
unbounded arrays
This commit is contained in:
parent
7db3eaeefe
commit
860e3ebb1d
1 changed files with 3 additions and 2 deletions
|
@ -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) {
|
||||
|
|
Loading…
Reference in a new issue