# HG changeset patch # User Matthew Wild # Date 1259192745 0 # Node ID 81b4e738e4d321b78274132f63a9aec7007e64eb # Parent 9e1c6b6a2ee4109648cae3a2829620e674cf74e7 util.serialization: Correctly serialize tables with 'false' as a key, fixes an issue with rosters not saving (thanks mathias, Tobias) diff -r 9e1c6b6a2ee4 -r 81b4e738e4d3 util/serialization.lua --- a/util/serialization.lua Wed Nov 25 19:58:19 2009 +0000 +++ b/util/serialization.lua Wed Nov 25 23:45:45 2009 +0000 @@ -35,7 +35,7 @@ elseif type(o) == "string" then func(t, (("%q"):format(o):gsub("\\\n", "\\n"))); elseif type(o) == "table" then - if next(o) then + if next(o) ~= nil then func(t, "{\n"); for k,v in pairs(o) do func(t, indent(ind));