mirror of
https://github.com/DarkPlacesEngine/gmqcc.git
synced 2025-01-18 14:21:36 +00:00
update other value/const check for array indexing
This commit is contained in:
parent
696a8629b3
commit
bda5ff4213
1 changed files with 2 additions and 2 deletions
4
ast.c
4
ast.c
|
@ -1552,7 +1552,7 @@ bool ast_store_codegen(ast_store *self, ast_function *func, bool lvalue, ir_valu
|
|||
ai = (ast_array_index*)self->dest;
|
||||
idx = (ast_value*)ai->index;
|
||||
|
||||
if (ast_istype(ai->index, ast_value) && idx->hasvalue)
|
||||
if (ast_istype(ai->index, ast_value) && idx->hasvalue && idx->cvq == CV_CONST)
|
||||
ai = NULL;
|
||||
}
|
||||
|
||||
|
@ -1776,7 +1776,7 @@ bool ast_binstore_codegen(ast_binstore *self, ast_function *func, bool lvalue, i
|
|||
ai = (ast_array_index*)self->dest;
|
||||
idx = (ast_value*)ai->index;
|
||||
|
||||
if (ast_istype(ai->index, ast_value) && idx->hasvalue)
|
||||
if (ast_istype(ai->index, ast_value) && idx->hasvalue && idx->cvq == CV_CONST)
|
||||
ai = NULL;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue