summaryrefslogtreecommitdiff
path: root/src/lj_dispatch.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/lj_dispatch.c')
-rw-r--r--src/lj_dispatch.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/lj_dispatch.c b/src/lj_dispatch.c
index 09cb2f5d..5378531d 100644
--- a/src/lj_dispatch.c
+++ b/src/lj_dispatch.c
@@ -301,12 +301,12 @@ void LJ_FASTCALL lj_dispatch_ins(lua_State *L, const BCIns *pc)
301 g->hookcount = g->hookcstart; 301 g->hookcount = g->hookcstart;
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) && proto_lineinfo(pt)) {
305 BCPos npc = proto_bcpos(pt, pc) - 1; 305 BCPos npc = proto_bcpos(pt, pc) - 1;
306 BCPos opc = proto_bcpos(pt, oldpc) - 1; 306 BCPos opc = proto_bcpos(pt, oldpc) - 1;
307 BCLine line = pt->lineinfo[npc]; 307 BCLine line = proto_line(pt, 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 != proto_line(pt, opc)) {
310 L->top = L->base + slots; /* Fix top again after instruction hook. */ 310 L->top = L->base + slots; /* Fix top again after instruction hook. */
311 callhook(L, LUA_HOOKLINE, line); 311 callhook(L, LUA_HOOKLINE, line);
312 } 312 }