summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristian Göttsche <cgzones@googlemail.com>2020-11-29 14:14:46 +0100
committerBenBE <BenBE@geshi.org>2020-11-29 15:06:08 +0100
commitcd305b4325cc9ea9c21cbdaad570ffcff1f1ecd7 (patch)
treed59e6febc1f02cc2e8912a8b21bd72b95632df41
parentc1563337ae366ca66f25ed71a2f462a486df1337 (diff)
Print G in gigabyte color
When printing a size like 27.2G print the G like the 27 in the gigabyte color.
-rw-r--r--Process.c3
1 files changed, 2 insertions, 1 deletions
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;

© 2014-2024 Faster IT GmbH | imprint | privacy policy