projects
/
oweals
/
minetest.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5b55deb
)
Fix imprecise serialization of large numbers
author
ShadowNinja
<shadowninja@minetest.net>
Mon, 26 Jan 2015 01:19:35 +0000
(20:19 -0500)
committer
ShadowNinja
<shadowninja@minetest.net>
Mon, 26 Jan 2015 01:19:35 +0000
(20:19 -0500)
builtin/common/serialize.lua
patch
|
blob
|
history
diff --git
a/builtin/common/serialize.lua
b/builtin/common/serialize.lua
index b7643b2f4c1c15842729f93aa14a4a44472a8aba..24b2a12ee3be9e2219ecdfbcf2f9393cf7710254 100644
(file)
--- 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