diff options
| -rw-r--r-- | src/lj_gc.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/lj_gc.c b/src/lj_gc.c index 08972dc5..1fed0b54 100644 --- a/src/lj_gc.c +++ b/src/lj_gc.c | |||
| @@ -525,10 +525,12 @@ static void gc_call_finalizer(global_State *g, lua_State *L, | |||
| 525 | if (LJ_HASPROFILE && (oldh & HOOK_PROFILE)) lj_dispatch_update(g); | 525 | if (LJ_HASPROFILE && (oldh & HOOK_PROFILE)) lj_dispatch_update(g); |
| 526 | g->gc.threshold = oldt; /* Restore GC threshold. */ | 526 | g->gc.threshold = oldt; /* Restore GC threshold. */ |
| 527 | if (errcode) { | 527 | if (errcode) { |
| 528 | TValue tmp; | ||
| 529 | copyTV(VL, &tmp, VL->top-1); | ||
| 530 | VL->top--; | ||
| 528 | lj_vmevent_send(g, ERRFIN, | 531 | lj_vmevent_send(g, ERRFIN, |
| 529 | copyTV(V, V->top++, L->top-1); | 532 | copyTV(V, V->top++, &tmp); |
| 530 | ); | 533 | ); |
| 531 | L->top--; | ||
| 532 | } | 534 | } |
| 533 | } | 535 | } |
| 534 | 536 | ||
