mirror of
https://github.com/MightyPirates/OpenComputers.git
synced 2025-09-19 04:06:43 -04:00
Update serialization.lua (#2416)
Corrected global leak, "_" is a valid variable and can lead to problems if it exists.
This commit is contained in:
parent
294a09edde
commit
62471f7d32
@ -126,7 +126,7 @@ end
|
|||||||
|
|
||||||
function serialization.unserialize(data)
|
function serialization.unserialize(data)
|
||||||
checkArg(1, data, "string")
|
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
|
if not result then
|
||||||
return nil, reason
|
return nil, reason
|
||||||
end
|
end
|
||||||
|
Loading…
x
Reference in New Issue
Block a user