aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/lvm.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/lvm.js b/src/lvm.js
index 6711bfa..4804cde 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? */
@@ -54,7 +54,7 @@ const luaV_finishOp = function(L) {
let top = L.top - 1; /* top when 'luaT_trybinTM' was called */
let b = inst.B; /* first element to concatenate */
let total = top - 1 - (base + b); /* yet to concatenate */
- L.stack[L.top - 2] = L.stack[top]; /* put TM result in proper position */
+ L.stack[top - 2] = L.stack[top]; /* put TM result in proper position */
if (total > 1) { /* are there elements to concat? */
L.top = top - 1; /* top is one after last element (at top-2) */
luaV_concat(L, total); /* concat them (may yield again) */