From d64868d54c4ea90515066f110ae4f49a2f1fa112 Mon Sep 17 00:00:00 2001 From: Kazhnuz Date: Sat, 3 Apr 2021 18:01:15 +0200 Subject: [PATCH] fix: fix numberToString --- sonic-radiance.love/core/utils/math.lua | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/sonic-radiance.love/core/utils/math.lua b/sonic-radiance.love/core/utils/math.lua index 5112c45..6edc137 100644 --- a/sonic-radiance.love/core/utils/math.lua +++ b/sonic-radiance.love/core/utils/math.lua @@ -112,8 +112,7 @@ function Math.numberToString(x, length) local length = length or 1 local string = "" local x = x - if (x >= math.pow(10, length)) then - x = length*10 - 1 + if (x < math.pow(10, length)) then string = string .. x else for i=1, (length-1) do