mirror of
https://github.com/minetest/minetest.git
synced 2025-02-17 10:23:47 +01:00
Fix imprecise serialization of large numbers
This commit is contained in:
@ -115,7 +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 == "number" then return tostring(x)
|
elseif tp == "number" then return string.format("%d", x)
|
||||||
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
|
||||||
|
Reference in New Issue
Block a user