summaryrefslogtreecommitdiff
path: root/src/lvm.js
diff options
context:
space:
mode:
authorBenoit Giannangeli <giann008@gmail.com>2017-08-03 12:08:10 +0200
committerBenoit Giannangeli <giann008@gmail.com>2017-08-10 09:10:10 +0200
commit976ddcc997f1bc299c2e1e2b23b4ff79e7bbfcb3 (patch)
tree8e8316edc94c4bdefa920f7c95c0c568beae9468 /src/lvm.js
parent79e59c208d4624cc63c787cbcf4c989f2aeaaf60 (diff)
downloadfengari-976ddcc997f1bc299c2e1e2b23b4ff79e7bbfcb3.tar.gz
fengari-976ddcc997f1bc299c2e1e2b23b4ff79e7bbfcb3.tar.bz2
fengari-976ddcc997f1bc299c2e1e2b23b4ff79e7bbfcb3.zip
Fixed correct let declaration that will fail babili
Diffstat (limited to 'src/lvm.js')
-rw-r--r--src/lvm.js6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/lvm.js b/src/lvm.js
index 013b192..f974693 100644
--- a/src/lvm.js
+++ b/src/lvm.js
@@ -646,18 +646,20 @@ const luaV_lessthan = function(L, l, r) {
};
const luaV_lessequal = function(L, l, r) {
+ let res;
+
if (l.ttisnumber() && r.ttisnumber())
return LEnum(l, r) ? 1 : 0;
else if (l.ttisstring() && r.ttisstring())
return l_strcmp(l.tsvalue(), r.tsvalue()) <= 0 ? 1 : 0;
else {
- let res = ltm.luaT_callorderTM(L, l, r, ltm.TMS.TM_LE);
+ res = ltm.luaT_callorderTM(L, l, r, ltm.TMS.TM_LE);
if (res !== null)
return res ? 1 : 0;
}
/* try 'lt': */
L.ci.callstatus |= lstate.CIST_LEQ; /* mark it is doing 'lt' for 'le' */
- let res = ltm.luaT_callorderTM(L, r, l, ltm.TMS.TM_LT);
+ res = ltm.luaT_callorderTM(L, r, l, ltm.TMS.TM_LT);
L.ci.callstatus ^= lstate.CIST_LEQ; /* clear mark */
if (res === null)
ldebug.luaG_ordererror(L, l, r);