Fix a bug in dc

Since dc uses map for functions now, I can't remove them in
`bc_vm_clean()`.
This commit is contained in:
Gavin Howard 2020-06-16 01:27:20 -06:00
parent 599cb78478
commit 85ac0e9cbe
Signed by: gavin
GPG Key ID: C08038BDF280D33E
1 changed files with 4 additions and 5 deletions

View File

@ -455,15 +455,14 @@ static void bc_vm_clean(void) {
ip->idx == f->code.len)
{
#if BC_ENABLED
if (BC_IS_BC) bc_vec_npop(&f->labels, f->labels.len);
if (BC_IS_BC) {
bc_vec_npop(&f->labels, f->labels.len);
bc_vec_npop(&f->strs, f->strs.len);
}
#endif // BC_ENABLED
bc_vec_npop(&f->strs, f->strs.len);
bc_vec_npop(&f->consts, f->consts.len);
bc_vec_npop(&f->code, f->code.len);
ip->idx = 0;
#if DC_ENABLED
if (!BC_IS_BC) bc_vec_npop(fns, fns->len - BC_PROG_REQ_FUNCS);
#endif // DC_ENABLED
}
}