1
0
Fork 0

Merge pull request #15 from nikeinikei/master

Fix serializing of tables with overloaded indexing / using __index metamethod
master
rxi 2019-04-09 20:10:27 +01:00 committed by GitHub
commit f049daf06c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -65,7 +65,7 @@ local function encode_table(val, stack)
stack[val] = true
if val[1] ~= nil or next(val) == nil then
if rawget(val, 1) ~= nil or next(val) == nil then
-- Treat as array -- check keys are valid and it is not sparse
local n = 0
for k in pairs(val) do