From da68b3cbaf9c2c8b7d36ac224790aae84b1fe686 Mon Sep 17 00:00:00 2001 From: Emmanuel Lepage Vallee Date: Mon, 1 Oct 2018 14:55:53 -0400 Subject: [PATCH] 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. --- lib/gears/table.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/gears/table.lua b/lib/gears/table.lua index 54ceab4be..8b9bb6c26 100644 --- a/lib/gears/table.lua +++ b/lib/gears/table.lua @@ -18,7 +18,7 @@ local gtable = {} -- @return A new table containing all keys from the arguments. function gtable.join(...) local ret = {} - for _, t in pairs({...}) do + for _, t in ipairs({...}) do if t then for k, v in pairs(t) do if type(k) == "number" then