mirror of
https://github.com/DarkPlacesEngine/gmqcc.git
synced 2025-01-31 03:50:36 +00:00
Don't treat initialized non-consts as static array indices
This commit is contained in:
parent
6acd159c9c
commit
696a8629b3
1 changed files with 1 additions and 1 deletions
2
ast.c
2
ast.c
|
@ -2025,7 +2025,7 @@ bool ast_array_index_codegen(ast_array_index *self, ast_function *func, bool lva
|
|||
arr = (ast_value*)self->array;
|
||||
idx = (ast_value*)self->index;
|
||||
|
||||
if (!ast_istype(self->index, ast_value) || !idx->hasvalue) {
|
||||
if (!ast_istype(self->index, ast_value) || !idx->hasvalue || idx->cvq != CV_CONST) {
|
||||
/* Time to use accessor functions */
|
||||
ast_expression_codegen *cgen;
|
||||
ir_value *iridx, *funval;
|
||||
|
|
Loading…
Reference in a new issue