Print G in gigabyte color

When printing a size like 27.2G print the G like the 27 in the gigabyte color.
This commit is contained in:
Christian Göttsche 2020-11-29 14:14:46 +01:00 committed by BenBE
parent c1563337ae
commit cd305b4325

View File

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