Fix for saving tables with non-string keys
authorMatthew Wild <mwild1@gmail.com>
Wed, 8 Oct 2008 21:42:51 +0000 (22:42 +0100)
committerMatthew Wild <mwild1@gmail.com>
Wed, 8 Oct 2008 21:42:51 +0000 (22:42 +0100)
util/datamanager.lua

index be63673e80d090ec59567a06eb1c3df5e4755830..71c0fe86dad44edf71211a812e5fe2d2f051e3b3 100644 (file)
@@ -43,7 +43,7 @@ local function simplesave (f, o)
       elseif type(o) == "table" then
         f:write("{\n")
         for k,v in pairs(o) do
-          f:write(" [", format("%q", k), "] = ")
+          f:write(" [", basicSerialize(k), "] = ")
           simplesave(f, v)
           f:write(",\n")
         end