diff options
Diffstat (limited to 'src/lj_dispatch.c')
-rw-r--r-- | src/lj_dispatch.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/lj_dispatch.c b/src/lj_dispatch.c index a94afea9..09cb2f5d 100644 --- a/src/lj_dispatch.c +++ b/src/lj_dispatch.c | |||
@@ -117,7 +117,7 @@ static void setptmode_all(global_State *g, GCproto *pt, int mode) | |||
117 | { | 117 | { |
118 | ptrdiff_t i; | 118 | ptrdiff_t i; |
119 | for (i = -(ptrdiff_t)pt->sizekgc; i < 0; i++) { | 119 | for (i = -(ptrdiff_t)pt->sizekgc; i < 0; i++) { |
120 | GCobj *o = gcref(pt->k.gc[i]); | 120 | GCobj *o = proto_kgc(pt, i); |
121 | if (o->gch.gct == ~LJ_TPROTO) { | 121 | if (o->gch.gct == ~LJ_TPROTO) { |
122 | setptmode(g, gco2pt(o), mode); | 122 | setptmode(g, gco2pt(o), mode); |
123 | setptmode_all(g, gco2pt(o), mode); | 123 | setptmode_all(g, gco2pt(o), mode); |
@@ -302,8 +302,8 @@ void LJ_FASTCALL lj_dispatch_ins(lua_State *L, const BCIns *pc) | |||
302 | callhook(L, LUA_HOOKCOUNT, -1); | 302 | callhook(L, LUA_HOOKCOUNT, -1); |
303 | } | 303 | } |
304 | if ((g->hookmask & LUA_MASKLINE) && pt->lineinfo) { | 304 | if ((g->hookmask & LUA_MASKLINE) && pt->lineinfo) { |
305 | BCPos npc = (BCPos)(pc - pt->bc)-1; | 305 | BCPos npc = proto_bcpos(pt, pc) - 1; |
306 | BCPos opc = (BCPos)(oldpc - pt->bc)-1; | 306 | BCPos opc = proto_bcpos(pt, oldpc) - 1; |
307 | BCLine line = pt->lineinfo[npc]; | 307 | BCLine line = pt->lineinfo[npc]; |
308 | if (npc == 0 || pc <= oldpc || | 308 | if (npc == 0 || pc <= oldpc || |
309 | opc >= pt->sizebc || line != pt->lineinfo[opc]) { | 309 | opc >= pt->sizebc || line != pt->lineinfo[opc]) { |