Skip to content

Commit

Permalink
Merge pull request #95 from ltratt/deoff_by_one
Browse files Browse the repository at this point in the history
Use the `pcRel` macro to compute the current pc.
  • Loading branch information
vext01 authored Nov 1, 2024
2 parents bb0504c + b65c773 commit 3bad330
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/lvm.c
Original file line number Diff line number Diff line change
Expand Up @@ -1223,7 +1223,7 @@ void luaV_execute (lua_State *L, CallInfo *ci) {
#ifdef USE_YK
YkLocation *ykloc = NULL;
if (GET_OPCODE(i) == OP_FORLOOP || GET_OPCODE(i) == OP_TFORLOOP)
ykloc = &cl->p->yklocs[pc - cl->p->code];
ykloc = &cl->p->yklocs[pcRel(pc, cl->p)];
yk_mt_control_point(G(L)->yk_mt, ykloc);
#endif
#if 0
Expand Down

0 comments on commit 3bad330

Please sign in to comment.