Skip to content

Commit

Permalink
fix table.deepcount stack overflow (#113)
Browse files Browse the repository at this point in the history
  • Loading branch information
truemedian authored and SinisterRectus committed Apr 1, 2018
1 parent 2c55ffe commit 7888a7f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion libs/extensions.lua
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ end
function table.deepcount(tbl)
local n = 0
for _, v in pairs(tbl) do
n = type(v) == 'table' and n + table.deepcount(tbl) or n + 1
n = type(v) == 'table' and n + table.deepcount(v) or n + 1
end
return n
end
Expand Down

0 comments on commit 7888a7f

Please sign in to comment.