aboutsummaryrefslogtreecommitdiff
path: root/builtin
diff options
context:
space:
mode:
authorShadowNinja <shadowninja@minetest.net>2015-01-25 20:19:35 -0500
committerShadowNinja <shadowninja@minetest.net>2015-01-25 20:19:35 -0500
commit47aca6f6d164347de950a46b11e1774445cdb9e3 (patch)
tree77094213fbec2bed3712cbd8de1e9f16cc9c294e /builtin
parent5b55deb1ebfd55562a6a57fbdbf5dce86015ca86 (diff)
downloadminetest-47aca6f6d164347de950a46b11e1774445cdb9e3.tar.gz
minetest-47aca6f6d164347de950a46b11e1774445cdb9e3.tar.bz2
minetest-47aca6f6d164347de950a46b11e1774445cdb9e3.zip
Fix imprecise serialization of large numbers
Diffstat (limited to 'builtin')
-rw-r--r--builtin/common/serialize.lua2
1 files changed, 1 insertions, 1 deletions
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