From: Wolfgang (Blub) Bumiller Date: Thu, 16 Aug 2012 14:21:09 +0000 (+0200) Subject: even in non-qcc mode we need to search the variables for fields because of field... X-Git-Tag: 0.1-rc1~247 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=1a3a0014c51d8110f6d6d9f4c2804221edeb56d5;p=xonotic%2Fgmqcc.git even in non-qcc mode we need to search the variables for fields because of field-pointers --- diff --git a/parser.c b/parser.c index 7407439..62953ce 100644 --- a/parser.c +++ b/parser.c @@ -965,8 +965,12 @@ static ast_expression* parser_expression_leave(parser_t *parser, bool stopatcomm /* variable */ if (opts_standard == COMPILER_GMQCC) { - if (parser->memberof == TYPE_ENTITY) - var = parser_find_field(parser, parser_tokval(parser)); + if (parser->memberof == TYPE_ENTITY) { + /* still get vars first since there could be a fieldpointer */ + var = parser_find_var(parser, parser_tokval(parser)); + if (!var) + var = parser_find_field(parser, parser_tokval(parser)); + } else if (parser->memberof == TYPE_VECTOR) { parseerror(parser, "TODO: implement effective vector member access");