Update IO rate display to use NAN on error

This commit is contained in:
Benny Baumann
2020-09-07 11:53:58 +02:00
committed by cgzones
parent 47e2cefe02
commit 29ec115143
3 changed files with 13 additions and 6 deletions

View File

@ -219,7 +219,7 @@ void Process_outputRate(RichString* str, char* buffer, int n, double rate, int c
largeNumberColor = CRT_colors[PROCESS];
processMegabytesColor = CRT_colors[PROCESS];
}
if (rate == -1) {
if (isnan(rate)) {
int len = snprintf(buffer, n, " no perm ");
RichString_appendn(str, CRT_colors[PROCESS_SHADOW], buffer, len);
} else if (rate < ONE_K) {