Fix OP_JMP description.

This commit is contained in:
Enyby
2019-07-15 05:29:37 +03:00
parent e6736857b6
commit 5f52729fc9
2 changed files with 2 additions and 2 deletions

View File

@@ -208,7 +208,7 @@ public class Lua {
public static final int OP_CONCAT = 22; /* A B C R(A) := R(B).. ... ..R(C) */ public static final int OP_CONCAT = 22; /* A B C R(A) := R(B).. ... ..R(C) */
public static final int OP_JMP = 23; /* sBx pc+=sBx */ public static final int OP_JMP = 23; /* A sBx pc+=sBx; if (A) close all upvalues >= R(A - 1) */
public static final int OP_EQ = 24; /* A B C if ((RK(B) == RK(C)) ~= A) then pc++ */ public static final int OP_EQ = 24; /* A B C if ((RK(B) == RK(C)) ~= A) then pc++ */
public static final int OP_LT = 25; /* A B C if ((RK(B) < RK(C)) ~= A) then pc++ */ public static final int OP_LT = 25; /* A B C if ((RK(B) < RK(C)) ~= A) then pc++ */
public static final int OP_LE = 26; /* A B C if ((RK(B) <= RK(C)) ~= A) then pc++ */ public static final int OP_LE = 26; /* A B C if ((RK(B) <= RK(C)) ~= A) then pc++ */

View File

@@ -320,7 +320,7 @@ public class LuaClosure extends LuaFunction {
} }
continue; continue;
case Lua.OP_JMP: /* sBx pc+=sBx */ case Lua.OP_JMP: /* A sBx pc+=sBx; if (A) close all upvalues >= R(A - 1) */
pc += (i>>>14)-0x1ffff; pc += (i>>>14)-0x1ffff;
if (a > 0) { if (a > 0) {
for (--a, b = openups.length; --b>=0; ) for (--a, b = openups.length; --b>=0; )