Another fix for lua_yield() from C hook.
Reported by Jason Carr.
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user