mirror of
https://github.com/DarkPlacesEngine/gmqcc.git
synced 2024-11-24 04:41:25 +00:00
Use "##" to ensure the names of the accumulated functions are striped by the IR.
This commit is contained in:
parent
cfea900afd
commit
05ac126d6f
1 changed files with 1 additions and 1 deletions
2
parser.c
2
parser.c
|
@ -4007,7 +4007,7 @@ static bool parse_function_body(parser_t *parser, ast_value *var)
|
||||||
}
|
}
|
||||||
|
|
||||||
/* generate a new name increasing the accumulation count*/
|
/* generate a new name increasing the accumulation count*/
|
||||||
util_snprintf(acname, sizeof(acname), "$ACCUMULATE_%s_%d", var->name, var->constval.vfunc->accumulation++);
|
util_snprintf(acname, sizeof(acname), "##ACCUMULATE_%s_%d", var->name, var->constval.vfunc->accumulation++);
|
||||||
accum = ast_value_new(parser_ctx(parser), acname, ((ast_expression*)var)->vtype);
|
accum = ast_value_new(parser_ctx(parser), acname, ((ast_expression*)var)->vtype);
|
||||||
if (!accum)
|
if (!accum)
|
||||||
return false;
|
return false;
|
||||||
|
|
Loading…
Reference in a new issue