From d003edcba6aaf29f74b904c09fc9dfdf3b2ff2cc Mon Sep 17 00:00:00 2001 From: = <=> Date: Tue, 31 Jul 2018 00:27:13 -0500 Subject: Fix for issue 300: Correctly print usage for cpu 10 --- src/print_cpu_usage.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/print_cpu_usage.c b/src/print_cpu_usage.c index 615fe5d..1fccba4 100644 --- a/src/print_cpu_usage.c +++ b/src/print_cpu_usage.c @@ -163,7 +163,7 @@ void print_cpu_usage(yajl_gen json_gen, char *buffer, const char *format, const } int padding = 1; int step = 10; - while (step < number) { + while (step <= number) { step *= 10; padding++; } -- cgit v1.2.3