From 42fbc509d98d330686a8c890933b21e3847adb91 Mon Sep 17 00:00:00 2001 From: Benoit Giannangeli Date: Sun, 21 May 2017 01:17:02 +0200 Subject: Fixed bad opcode test in luaV_finishOp --- src/lvm.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/lvm.js') 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; } -- cgit v1.2.3-54-g00ecf