mirror of
https://github.com/edubart/otclient.git
synced 2025-10-15 03:54:54 +02:00
Fix table.equals
This commit is contained in:
@@ -183,13 +183,10 @@ function table.collect(t, func)
|
|||||||
end
|
end
|
||||||
|
|
||||||
function table.equals(t, comp)
|
function table.equals(t, comp)
|
||||||
local equals = false
|
|
||||||
if type(t) == "table" and type(comp) == "table" then
|
if type(t) == "table" and type(comp) == "table" then
|
||||||
for k,v in pairs(t) do
|
for k,v in pairs(t) do
|
||||||
if v == comp[k] then
|
if v ~= comp[k] then return false end
|
||||||
equals = true
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
return equals
|
return true
|
||||||
end
|
end
|
Reference in New Issue
Block a user