diff options
Diffstat (limited to 'package')
-rw-r--r-- | package/utils/lua/patches-host/012-lnum-fix-ltle-relational-operators.patch | 22 | ||||
-rw-r--r-- | package/utils/lua/patches/012-lnum-fix-ltle-relational-operators.patch | 22 |
2 files changed, 44 insertions, 0 deletions
diff --git a/package/utils/lua/patches-host/012-lnum-fix-ltle-relational-operators.patch b/package/utils/lua/patches-host/012-lnum-fix-ltle-relational-operators.patch new file mode 100644 index 0000000000..937fc137e8 --- /dev/null +++ b/package/utils/lua/patches-host/012-lnum-fix-ltle-relational-operators.patch @@ -0,0 +1,22 @@ +--- a/src/lvm.c ++++ b/src/lvm.c +@@ -284,7 +284,8 @@ int luaV_lessthan (lua_State *L, const T + 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); +@@ -322,7 +323,8 @@ static int lessequal (lua_State *L, cons + 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; diff --git a/package/utils/lua/patches/012-lnum-fix-ltle-relational-operators.patch b/package/utils/lua/patches/012-lnum-fix-ltle-relational-operators.patch new file mode 100644 index 0000000000..937fc137e8 --- /dev/null +++ b/package/utils/lua/patches/012-lnum-fix-ltle-relational-operators.patch @@ -0,0 +1,22 @@ +--- a/src/lvm.c ++++ b/src/lvm.c +@@ -284,7 +284,8 @@ int luaV_lessthan (lua_State *L, const T + 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); +@@ -322,7 +323,8 @@ static int lessequal (lua_State *L, cons + 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; |