mirror of
https://github.com/frida/tinycc
synced 2025-01-03 02:24:24 +03:00
fix cleanup with for loop initialisation
Signed-off-by: matthias <uso.cosmo.ray@gmail.com>
This commit is contained in:
parent
0d54946dec
commit
14be3a1dc1
6
tccgen.c
6
tccgen.c
@ -6276,6 +6276,9 @@ static void block(int *bsym, Sym *bcl, int *csym, Sym *ccl, int is_expr)
|
||||
} else if (tok == TOK_FOR) {
|
||||
int e;
|
||||
int saved_nocode_wanted;
|
||||
Sym *lcleanup = current_cleanups;
|
||||
int lncleanups = ncleanups;
|
||||
|
||||
nocode_wanted &= ~0x20000000;
|
||||
next();
|
||||
skip('(');
|
||||
@ -6317,6 +6320,9 @@ static void block(int *bsym, Sym *bcl, int *csym, Sym *ccl, int is_expr)
|
||||
gsym(a);
|
||||
gsym_addr(b, c);
|
||||
--local_scope;
|
||||
try_call_scope_cleanup(lcleanup);
|
||||
ncleanups = lncleanups;
|
||||
current_cleanups = lcleanup;
|
||||
sym_pop(&local_stack, s, 0);
|
||||
|
||||
} else
|
||||
|
Loading…
Reference in New Issue
Block a user