diff options
author | Kartik K. Agaram <vc@akkartik.com> | 2022-11-30 23:03:50 -0800 |
---|---|---|
committer | Kartik K. Agaram <vc@akkartik.com> | 2022-11-30 23:03:50 -0800 |
commit | a8a8965b1b313acb7a5d7395aa72c68348e0ddb2 (patch) | |
tree | 61b6a22d536709d07365a7373fd533359c1d1218 | |
parent | 4335669ecc00bb940c53217076dd422f3eb1c0e6 (diff) | |
download | view.love-a8a8965b1b313acb7a5d7395aa72c68348e0ddb2.tar.gz |
compare nested tables
-rw-r--r-- | test.lua | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/test.lua b/test.lua index b2b6f3c..ab890b8 100644 --- a/test.lua +++ b/test.lua @@ -32,12 +32,12 @@ function eq(a, b) if type(a) == 'table' then if #a ~= #b then return false end for k, v in pairs(a) do - if b[k] ~= v then + if not eq(b[k], v) then return false end end for k, v in pairs(b) do - if a[k] ~= v then + if not eq(a[k], v) then return false end end |