From d226e6199f0a28c1ff1c7739f024e7dc6cb40a39 Mon Sep 17 00:00:00 2001 From: aristocratos Date: Thu, 30 Sep 2021 22:48:03 +0200 Subject: [PATCH] Fixed: Cpu percent formatting if over 10'000 --- src/btop_draw.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/btop_draw.cpp b/src/btop_draw.cpp index 0234d3a..7406d15 100644 --- a/src/btop_draw.cpp +++ b/src/btop_draw.cpp @@ -1418,6 +1418,7 @@ namespace Proc { else if (p.cpu_p >= 10'000) { cpu_str = to_string(p.cpu_p / 1000); cpu_str.resize(3); + if (cpu_str.ends_with('.')) cpu_str.pop_back(); cpu_str += "k"; } string mem_str = (mem_bytes ? floating_humanizer(p.mem, true) : "");