summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenoit Giannangeli <giann008@gmail.com>2017-05-21 01:17:02 +0200
committerBenoit Giannangeli <giann008@gmail.com>2017-05-21 01:17:02 +0200
commit42fbc509d98d330686a8c890933b21e3847adb91 (patch)
tree3077ea80db9ebd679c10b4f048735c2a2b2ed3a5
parent22874829057e03bbc9aabdad2970048e0b9b9258 (diff)
downloadfengari-42fbc509d98d330686a8c890933b21e3847adb91.tar.gz
fengari-42fbc509d98d330686a8c890933b21e3847adb91.tar.bz2
fengari-42fbc509d98d330686a8c890933b21e3847adb91.zip
Fixed bad opcode test in luaV_finishOp
-rw-r--r--src/lvm.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/lvm.js b/src/lvm.js
index 6bc5377..516f995 100644
--- a/src/lvm.js
+++ b/src/lvm.js
@@ -45,7 +45,7 @@ const luaV_finishOp = function(L) {
ci.callstatus ^= lstate.CIST_LEQ; /* clear mark */
res = res !== 1 ? 1 : 0; /* negate result */
}
- assert(ci.l_code[ci.l_savedpc] === OCi.OP_JMP);
+ assert(ci.l_code[ci.l_savedpc].opcode === OCi.OP_JMP);
if (res !== inst.A) /* condition failed? */
ci.l_savedpc++; /* skip jump instruction */
break;
@@ -66,7 +66,7 @@ const luaV_finishOp = function(L) {
break;
}
case OCi.OP_TFORCALL: {
- assert(ci.l_code[ci.l_savedpc] === OCi.OP_TFORLOOP);
+ assert(ci.l_code[ci.l_savedpc].opcode === OCi.OP_TFORLOOP);
L.top = ci.top; /* correct top */
break;
}