Fix "Can't serialize data of type userdata"
This commit is contained in:
parent
563f260c31
commit
56455f4297
@ -115,6 +115,7 @@ function core.serialize(x)
|
|||||||
function dump_val(x)
|
function dump_val(x)
|
||||||
local tp = type(x)
|
local tp = type(x)
|
||||||
if x == nil then return "nil"
|
if x == nil then return "nil"
|
||||||
|
elseif tp == "userdata" then return "nil"
|
||||||
elseif tp == "string" then return string.format("%q", x)
|
elseif tp == "string" then return string.format("%q", x)
|
||||||
elseif tp == "boolean" then return x and "true" or "false"
|
elseif tp == "boolean" then return x and "true" or "false"
|
||||||
elseif tp == "function" then
|
elseif tp == "function" then
|
||||||
|
Loading…
x
Reference in New Issue
Block a user