From 6906fff17b9099977934537be0edd2331b4c8b26 Mon Sep 17 00:00:00 2001 From: VanessaE Date: Wed, 3 Jun 2020 09:52:01 -0400 Subject: [PATCH] fix overflow glitch in progress bar --- init.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/init.lua b/init.lua index 3c19093..ebd3b18 100644 --- a/init.lua +++ b/init.lua @@ -96,7 +96,7 @@ local utf8_len_2=string.find("▒X", "X")-1 local function indicator(maxVal, curVal) local percent_val = math.floor(curVal / maxVal * 100) - local v = math.ceil(percent_val / 10) + local v = math.min(math.ceil(percent_val / 10), 10) return "\n" ..string.sub("▓▓▓▓▓▓▓▓▓▓", 1, v*utf8_len_1)