Another fix for lua_yield() from C hook.

Reported by Jason Carr.
This commit is contained in:
Mike Pall
2020-09-22 23:37:43 +02:00
parent 518e8cbeb4
commit dd0f09f95f
4 changed files with 4 additions and 4 deletions

View File

@@ -687,9 +687,9 @@ LJ_NOINLINE void lj_err_optype_call(lua_State *L, TValue *o)
const BCIns *pc = cframe_Lpc(L);
if (((ptrdiff_t)pc & FRAME_TYPE) != FRAME_LUA) {
const char *tname = lj_typename(o);
setframe_gc(o, obj2gco(L), LJ_TTHREAD);
if (LJ_FR2) o++;
setframe_pc(o, pc);
setframe_gc(o, obj2gco(L), LJ_TTHREAD);
L->top = L->base = o+1;
err_msgv(L, LJ_ERR_BADCALL, tname);
}