2016-05-11 03:28:53 +00:00
|
|
|
--- a/src/lvm.c
|
|
|
|
+++ b/src/lvm.c
|
2018-01-04 20:07:59 +00:00
|
|
|
@@ -281,7 +281,8 @@ int luaV_lessthan (lua_State *L, const T
|
2016-05-11 03:28:53 +00:00
|
|
|
else
|
|
|
|
return luai_numlt( nvalue_fast(l), cast_num(ivalue(r)) );
|
|
|
|
|
|
|
|
- } else if ((res = call_orderTM(L, l, r, TM_LT)) != -1)
|
|
|
|
+ }
|
|
|
|
+ if ((res = call_orderTM(L, l, r, TM_LT)) != -1)
|
|
|
|
return res;
|
|
|
|
|
|
|
|
return luaG_ordererror(L, l, r);
|
2018-01-04 20:07:59 +00:00
|
|
|
@@ -319,7 +320,8 @@ static int lessequal (lua_State *L, cons
|
2016-05-11 03:28:53 +00:00
|
|
|
else
|
|
|
|
return luai_numle( nvalue_fast(l), cast_num(ivalue(r)) );
|
|
|
|
|
|
|
|
- } else if ((res = call_orderTM(L, l, r, TM_LE)) != -1) /* first try `le' */
|
|
|
|
+ }
|
|
|
|
+ if ((res = call_orderTM(L, l, r, TM_LE)) != -1) /* first try `le' */
|
|
|
|
return res;
|
|
|
|
else if ((res = call_orderTM(L, r, l, TM_LT)) != -1) /* else try `lt' */
|
|
|
|
return !res;
|