diff options
Diffstat (limited to 'ldo.c')
| -rw-r--r-- | ldo.c | 6 |
1 files changed, 3 insertions, 3 deletions
| @@ -327,7 +327,7 @@ static StkId rethook (lua_State *L, CallInfo *ci, StkId firstres, int nres) { | |||
| 327 | ptrdiff_t oldtop = savestack(L, L->top); /* hook may change top */ | 327 | ptrdiff_t oldtop = savestack(L, L->top); /* hook may change top */ |
| 328 | int delta = 0; | 328 | int delta = 0; |
| 329 | if (isLuacode(ci)) { | 329 | if (isLuacode(ci)) { |
| 330 | Proto *p = clLvalue(s2v(ci->func))->p; | 330 | Proto *p = ci_func(ci)->p; |
| 331 | if (p->is_vararg) | 331 | if (p->is_vararg) |
| 332 | delta = ci->u.l.nextraargs + p->numparams + 1; | 332 | delta = ci->u.l.nextraargs + p->numparams + 1; |
| 333 | if (L->top < ci->top) | 333 | if (L->top < ci->top) |
| @@ -340,8 +340,8 @@ static StkId rethook (lua_State *L, CallInfo *ci, StkId firstres, int nres) { | |||
| 340 | luaD_hook(L, LUA_HOOKRET, -1, ftransfer, nres); /* call it */ | 340 | luaD_hook(L, LUA_HOOKRET, -1, ftransfer, nres); /* call it */ |
| 341 | ci->func -= delta; | 341 | ci->func -= delta; |
| 342 | } | 342 | } |
| 343 | if (isLua(ci->previous)) | 343 | if (isLua(ci = ci->previous)) |
| 344 | L->oldpc = ci->previous->u.l.savedpc; /* update 'oldpc' */ | 344 | L->oldpc = pcRel(ci->u.l.savedpc, ci_func(ci)->p); /* update 'oldpc' */ |
| 345 | return restorestack(L, oldtop); | 345 | return restorestack(L, oldtop); |
| 346 | } | 346 | } |
| 347 | 347 | ||
