diff options
Diffstat (limited to 'src/lj_dispatch.c')
-rw-r--r-- | src/lj_dispatch.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/src/lj_dispatch.c b/src/lj_dispatch.c index 83bb4fd8..f956aa1b 100644 --- a/src/lj_dispatch.c +++ b/src/lj_dispatch.c | |||
@@ -380,11 +380,8 @@ void LJ_FASTCALL lj_dispatch_ins(lua_State *L, const BCIns *pc) | |||
380 | L->top = L->base + slots; /* Fix top again. */ | 380 | L->top = L->base + slots; /* Fix top again. */ |
381 | } | 381 | } |
382 | } | 382 | } |
383 | if ((g->hookmask & LUA_MASKRET)) { | 383 | if ((g->hookmask & LUA_MASKRET) && bc_isret(bc_op(pc[-1]))) |
384 | BCOp op = bc_op(pc[-1]); | 384 | callhook(L, LUA_HOOKRET, -1); |
385 | if (op == BC_RETM || op == BC_RET || op == BC_RET0 || op == BC_RET1) | ||
386 | callhook(L, LUA_HOOKRET, -1); | ||
387 | } | ||
388 | } | 385 | } |
389 | 386 | ||
390 | /* Initialize call. Ensure stack space and clear missing parameters. */ | 387 | /* Initialize call. Ensure stack space and clear missing parameters. */ |