fix overflow glitch in progress bar

This commit is contained in:
VanessaE 2020-06-03 09:52:01 -04:00
parent cc18a1e9ff
commit 6906fff17b

View File

@ -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)