From be3f9810115cbaded69be37ebc3d088ee252a225 Mon Sep 17 00:00:00 2001 From: Benoit Giannangeli Date: Wed, 10 May 2017 15:30:33 +0200 Subject: Fixed bad order when trying __lt TM in luaV_lessequal --- src/lvm.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') 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); -- cgit v1.2.3-70-g09d2