Fix for saving tables with non-string keys
authorMatthew Wild <mwild1@gmail.com>
Wed, 08 Oct 2008 22:42:51 +0100
changeset 82 cbf387f29d56
parent 81 a1f4f3c5ae25
child 87 059ef1c30844
Fix for saving tables with non-string keys
util/datamanager.lua
--- a/util/datamanager.lua	Wed Oct 08 17:27:20 2008 +0100
+++ b/util/datamanager.lua	Wed Oct 08 22:42:51 2008 +0100
@@ -43,7 +43,7 @@
       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