From: ShadowNinja Date: Mon, 26 Jan 2015 01:19:35 +0000 (-0500) Subject: Fix imprecise serialization of large numbers X-Git-Tag: 0.4.12~50 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=47aca6f6d164347de950a46b11e1774445cdb9e3;p=oweals%2Fminetest.git Fix imprecise serialization of large numbers --- diff --git a/builtin/common/serialize.lua b/builtin/common/serialize.lua index b7643b2f4..24b2a12ee 100644 --- a/builtin/common/serialize.lua +++ b/builtin/common/serialize.lua @@ -115,7 +115,7 @@ function core.serialize(x) function dump_val(x) local tp = type(x) 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 == "boolean" then return x and "true" or "false" elseif tp == "function" then