Browse Source

additional cleanup: removing function stack elements too

main
Ludovic 'Archivist' Lagouardette 6 days ago
parent
commit
14ac77bf8d
1 changed files with 5 additions and 0 deletions
  1. +5
    -0
      lib.c

+ 5
- 0
lib.c View File

@ -1210,7 +1210,12 @@ void ink_clean_routines(struct context* ctx) {
for (j = 0; j < ctx->routines[i].top; ++j) { for (j = 0; j < ctx->routines[i].top; ++j) {
ctx->routines[i].stack[j] = null; ctx->routines[i].stack[j] = null;
} }
for (j = 0; j < ctx->routines[i].function_stack_top; ++j) {
ctx->routines[i].function_stack[j].executing = null;
ctx->routines[i].function_stack[j].index = 0;
}
ctx->routines[i].top = 0; ctx->routines[i].top = 0;
ctx->routines[i].function_stack_top = 0;
} }
} }
} }

Loading…
Cancel
Save