From 12b3bd4ee03416cb8fd32b130f17d27050c7a363 Mon Sep 17 00:00:00 2001 From: BenDol Date: Wed, 9 Jul 2014 17:00:10 +1200 Subject: [PATCH] Fix table.equals --- modules/corelib/table.lua | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/modules/corelib/table.lua b/modules/corelib/table.lua index 4b9cf4f2..f6aedd1f 100644 --- a/modules/corelib/table.lua +++ b/modules/corelib/table.lua @@ -183,13 +183,10 @@ function table.collect(t, func) end function table.equals(t, comp) - local equals = false if type(t) == "table" and type(comp) == "table" then for k,v in pairs(t) do - if v == comp[k] then - equals = true - end + if v ~= comp[k] then return false end end end - return equals + return true end \ No newline at end of file