mirror of
https://github.com/xzeldon/htop.git
synced 2024-12-23 22:55:46 +00:00
Fix numbers larger than 100 terabytes
This commit is contained in:
parent
b7b4200f85
commit
f15d55c972
@ -277,7 +277,11 @@ void Process_colorNumber(RichString* str, unsigned long long number, bool colori
|
||||
if ((long long) number == -1LL) {
|
||||
int len = snprintf(buffer, 13, " no perm ");
|
||||
RichString_appendn(str, CRT_colors[PROCESS_SHADOW], buffer, len);
|
||||
} else if (number > 10000000000) {
|
||||
} else if (number >= 100000000000000) {
|
||||
xSnprintf(buffer, 13, "%11llu ", number / 1000000);
|
||||
RichString_appendn(str, largeNumberColor, buffer, 8);
|
||||
RichString_appendn(str, processMegabytesColor, buffer+8, 4);
|
||||
} else if (number >= 10000000000) {
|
||||
xSnprintf(buffer, 13, "%11llu ", number / 1000);
|
||||
RichString_appendn(str, largeNumberColor, buffer, 5);
|
||||
RichString_appendn(str, processMegabytesColor, buffer+5, 3);
|
||||
|
Loading…
Reference in New Issue
Block a user