aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthew Wild <mwild1@gmail.com>2009-11-25 23:45:45 +0000
committerMatthew Wild <mwild1@gmail.com>2009-11-25 23:45:45 +0000
commit2e3f2e68d7669723ad68d149b2c943ad925cadf8 (patch)
treef22f42f2b4d4cfd5a3495c0592a0c0b216c609fb
parent22d8917d8ced0783831e0050e1f0ca4089e273e8 (diff)
downloadprosody-vault/0.6.1.tar.gz
prosody-vault/0.6.1.zip
util.serialization: Correctly serialize tables with 'false' as a key, fixes an issue with rosters not saving (thanks mathias, Tobias)vault/0.6.10.6.1
-rw-r--r--util/serialization.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/util/serialization.lua b/util/serialization.lua
index 07a099c9..7071d3f7 100644
--- a/util/serialization.lua
+++ b/util/serialization.lua
@@ -35,7 +35,7 @@ local function _simplesave(o, ind, t, func)
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));