From 203f8c9ab75ef63a4090b7c979f7d725c7d1b5f9 Mon Sep 17 00:00:00 2001 From: "(Jip) Willem Wijnia" Date: Sun, 3 Mar 2024 19:05:26 +0100 Subject: [PATCH] Fix the printing of numbers --- lua/system/dkson.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lua/system/dkson.lua b/lua/system/dkson.lua index a3227b42f0..569d2537ab 100644 --- a/lua/system/dkson.lua +++ b/lua/system/dkson.lua @@ -161,8 +161,9 @@ end updatedecpoint() local function num2str (num) + return string.format("%.17g", num) -- An overflowing number will return "1.#INF", so we need to get rid of the trailing period. - return replace(fsub(fsub(tostring(num), numfilter, ""), ".$", ""), decpoint, ".") + -- return replace(fsub(fsub(tostring(num), numfilter, ""), ".$", ""), decpoint, ".") end local function str2num (str)