X-Git-Url: https://git.sur5r.net/?p=i3%2Fi3status;a=blobdiff_plain;f=src%2Fprint_cpu_usage.c;h=1fccba41abe0a3d74cb54000a54a06bdc907138b;hp=615fe5dc276140a196070972d91ed98b16b47a78;hb=d003edcba6aaf29f74b904c09fc9dfdf3b2ff2cc;hpb=639a67f752874142b1c081345fd36610e9046103 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++; }