Update serialization.lua (#2416)

Corrected global leak, "_" is a valid variable and can lead to problems if it exists.
This commit is contained in:
SDPhantom 2017-06-07 11:44:49 -07:00 committed by payonel
parent 294a09edde
commit 62471f7d32

View File

@ -126,7 +126,7 @@ end
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", nil, {math={huge=math.huge}})
if not result then
return nil, reason
end