aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBenoit Giannangeli <giann008@gmail.com>2017-05-10 15:30:33 +0200
committerBenoit Giannangeli <giann008@gmail.com>2017-05-10 15:30:33 +0200
commitbe3f9810115cbaded69be37ebc3d088ee252a225 (patch)
tree640f0890dbfb6988bbe21552bc8bc8660ce1620e /src
parentb4e21e155a1fc3f0b46439859332c408e65ec67d (diff)
downloadfengari-be3f9810115cbaded69be37ebc3d088ee252a225.tar.gz
fengari-be3f9810115cbaded69be37ebc3d088ee252a225.tar.bz2
fengari-be3f9810115cbaded69be37ebc3d088ee252a225.zip
Fixed bad order when trying __lt TM in luaV_lessequal
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 8ca7b98..0d30484 100644
--- a/src/lvm.js
+++ b/src/lvm.js
@@ -737,9 +737,9 @@ const luaV_lessequal = function(L, l, r) {
if (res >= 0)
return res ? 1 : 0;
}
-
+ /* try 'lt': */
L.ci.callstatus |= lstate.CIST_LEQ; /* mark it is doing 'lt' for 'le' */
- res = ltm.luaT_callorderTM(L, l, r, 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 < 0)
ldebug.luaG_ordererror(L, l, r);