summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBenoit Giannangeli <giann008@gmail.com>2017-05-21 09:41:50 +0200
committerBenoit Giannangeli <giann008@gmail.com>2017-05-21 09:41:50 +0200
commitde410e79749c1b4fb4d70f318226b9574d62db1d (patch)
tree6e7ce5e9af7edc2b8423686112a5c8346964ba2f /src
parent42fbc509d98d330686a8c890933b21e3847adb91 (diff)
downloadfengari-de410e79749c1b4fb4d70f318226b9574d62db1d.tar.gz
fengari-de410e79749c1b4fb4d70f318226b9574d62db1d.tar.bz2
fengari-de410e79749c1b4fb4d70f318226b9574d62db1d.zip
Fixed bad boolean comparison in luaV_finisOp
Diffstat (limited to 'src')
-rw-r--r--src/lvm.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/lvm.js b/src/lvm.js
index 516f995..3d17966 100644
--- a/src/lvm.js
+++ b/src/lvm.js
@@ -46,7 +46,7 @@ const luaV_finishOp = function(L) {
res = res !== 1 ? 1 : 0; /* negate result */
}
assert(ci.l_code[ci.l_savedpc].opcode === OCi.OP_JMP);
- if (res !== inst.A) /* condition failed? */
+ if (res !== (inst.A ? true : false)) /* condition failed? */
ci.l_savedpc++; /* skip jump instruction */
break;
}