summaryrefslogtreecommitdiff
path: root/src/lvm.js
diff options
context:
space:
mode:
authorBenoit Giannangeli <giann008@gmail.com>2017-05-22 09:26:03 +0200
committerBenoit Giannangeli <giann008@gmail.com>2017-05-22 09:26:03 +0200
commit18271b4169631ce8f10c10c0776d9bfb40bd691f (patch)
tree1b2e12e6757651ff90687a46d538f3c1adcfda60 /src/lvm.js
parent208c92b4b3bb551db89556dbfca6cac5f6dc1661 (diff)
downloadfengari-18271b4169631ce8f10c10c0776d9bfb40bd691f.tar.gz
fengari-18271b4169631ce8f10c10c0776d9bfb40bd691f.tar.bz2
fengari-18271b4169631ce8f10c10c0776d9bfb40bd691f.zip
Fixed bad boolean handling in luaV_finishOp
Diffstat (limited to 'src/lvm.js')
-rw-r--r--src/lvm.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/lvm.js b/src/lvm.js
index 4d3d5fb..56be558 100644
--- a/src/lvm.js
+++ b/src/lvm.js
@@ -43,7 +43,7 @@ const luaV_finishOp = function(L) {
if (ci.callstatus & lstate.CIST_LEQ) { /* "<=" using "<" instead? */
assert(op === OCi.OP_LE);
ci.callstatus ^= lstate.CIST_LEQ; /* clear mark */
- res = res !== 1 ? 1 : 0; /* negate result */
+ res = !res; /* negate result */
}
assert(ci.l_code[ci.l_savedpc].opcode === OCi.OP_JMP);
if (res !== (inst.A ? true : false)) /* condition failed? */