From: Sebastien GODARD Date: Wed, 16 Sep 2015 06:06:55 +0000 (+0200) Subject: Color support: Improve detection of zero values X-Git-Tag: v11.1.7~6 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=84e8835cc896a997a65b388e1e5987d20b3704f1;p=sysstat Color support: Improve detection of zero values Signed-off-by: Sebastien GODARD --- diff --git a/common.c b/common.c index 818fa9d..88030af 100644 --- a/common.c +++ b/common.c @@ -1005,7 +1005,8 @@ void cprintf_f(int num, int wi, int wd, ...) for (i = 0; i < num; i++) { val = va_arg(args, double); - if (val < 0.005) { + if (((val < 0.005) && (val > -0.005)) || + ((wd == 0) && (val < 0.5))) { printf("%s", sc_zero_int_stat); } else {