Made serialization work on straight lua.

This commit is contained in:
Izaya 2015-10-18 02:40:47 +11:00
parent 4eda641338
commit 6a951a0e1e

View File

@ -119,7 +119,6 @@ function serialization.serialize(value, pretty)
end end
function serialization.unserialize(data) function serialization.unserialize(data)
checkArg(1, data, "string")
local result, reason = load("return " .. data, "=data", _, {math={huge=math.huge}}) local result, reason = load("return " .. data, "=data", _, {math={huge=math.huge}})
if not result then if not result then
return nil, reason return nil, reason