mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-01-18 15:01:41 +00:00
fix temp reference counting on function call args
This commit is contained in:
parent
5253030d27
commit
0eda635483
1 changed files with 4 additions and 1 deletions
|
@ -363,7 +363,8 @@ print_expr (expr_t *e)
|
|||
} else {
|
||||
printf("<>");
|
||||
}
|
||||
printf (":%s)@", type_names [e->e.temp.type->type]);
|
||||
printf (":%s:%d)@", type_names [e->e.temp.type->type],
|
||||
e->e.temp.users);
|
||||
break;
|
||||
case ex_string:
|
||||
printf ("\"%s\"", e->e.string_val);
|
||||
|
@ -1082,6 +1083,8 @@ function_expr (expr_t *e1, expr_t *e2)
|
|||
call = new_block_expr ();
|
||||
for (e = e2, i = 0; e; e = e->next, i++) {
|
||||
*a = new_temp_def_expr (arg_types[i]);
|
||||
if (i) // compensate for new_binary_expr and the first arg
|
||||
inc_users(*a);
|
||||
append_expr (call, binary_expr ('=', *a, e));
|
||||
a = &(*a)->next;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue