From cd305b4325cc9ea9c21cbdaad570ffcff1f1ecd7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20G=C3=B6ttsche?= Date: Sun, 29 Nov 2020 14:14:46 +0100 Subject: Print G in gigabyte color When printing a size like 27.2G print the G like the 27 in the gigabyte color. --- Process.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'Process.c') diff --git a/Process.c b/Process.c index a1cfcb01..7ea2c4af 100644 --- a/Process.c +++ b/Process.c @@ -101,8 +101,9 @@ void Process_humanNumber(RichString* str, unsigned long long number, bool colori len = xSnprintf(buffer, sizeof(buffer), "%2llu", number/10); RichString_appendn(str, processGigabytesColor, buffer, len); number %= 10; - len = xSnprintf(buffer, sizeof(buffer), ".%1lluG ", number); + len = xSnprintf(buffer, sizeof(buffer), ".%1llu", number); RichString_appendn(str, processMegabytesColor, buffer, len); + RichString_append(str, processGigabytesColor, "G "); } else if (number < 1000 * ONE_M) { //3 digit GB number /= ONE_M; -- cgit v1.2.3