mirror of
https://github.com/DarkPlacesEngine/gmqcc.git
synced 2025-03-23 19:21:29 +00:00
entity setter array subscript needs to get a correct field type
This commit is contained in:
parent
5887afae62
commit
7dd31ccf77
1 changed files with 4 additions and 1 deletions
5
parser.c
5
parser.c
|
@ -4191,6 +4191,9 @@ static ast_expression *array_field_setter_node(
|
|||
if (!subscript)
|
||||
return NULL;
|
||||
|
||||
subscript->expression.next = ast_type_copy(ast_ctx(subscript), (ast_expression*)subscript);
|
||||
subscript->expression.vtype = TYPE_FIELD;
|
||||
|
||||
entfield = ast_entfield_new_force(ctx,
|
||||
(ast_expression*)entity,
|
||||
(ast_expression*)subscript,
|
||||
|
@ -5011,7 +5014,7 @@ static bool parse_variable(parser_t *parser, ast_block *localblock, bool nofield
|
|||
goto cleanup;
|
||||
*/
|
||||
}
|
||||
if (opts.standard == COMPILER_QCC &&
|
||||
if ((opts.standard == COMPILER_QCC || opts.standard == COMPILER_FTEQCC) &&
|
||||
(old = parser_find_global(parser, var->name)))
|
||||
{
|
||||
parseerror(parser, "cannot declare a field and a global of the same name with -std=qcc");
|
||||
|
|
Loading…
Reference in a new issue