table.join: Make deterministic.
`pairs` order isn't defined and `{...}` will always be ordered. There is no reason to have random behavior where it can be predicted at no additional cost.
This commit is contained in:
parent
3931ae370c
commit
da68b3cbaf
|
@ -18,7 +18,7 @@ local gtable = {}
|
||||||
-- @return A new table containing all keys from the arguments.
|
-- @return A new table containing all keys from the arguments.
|
||||||
function gtable.join(...)
|
function gtable.join(...)
|
||||||
local ret = {}
|
local ret = {}
|
||||||
for _, t in pairs({...}) do
|
for _, t in ipairs({...}) do
|
||||||
if t then
|
if t then
|
||||||
for k, v in pairs(t) do
|
for k, v in pairs(t) do
|
||||||
if type(k) == "number" then
|
if type(k) == "number" then
|
||||||
|
|
Loading…
Reference in New Issue