From 41f4c93226b3f66f51b91e44d431f54df8003e9e Mon Sep 17 00:00:00 2001 From: pdw <> Date: Fri, 18 Oct 2002 13:59:00 +0000 Subject: [PATCH] Further fixes to bandwidth display (how hard can it be... ?) --- ui.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ui.c b/ui.c index 6d1ae9b..150b3b3 100644 --- a/ui.c +++ b/ui.c @@ -87,10 +87,10 @@ int screen_line_compare(void* a, void* b) { void readable_size(float n, char* buf, int bsize, int ksize, int bytes) { int i = 0; - int size = 1; + float size = 1; while(1) { - if(n < size * ksize || i >= UNIT_DIVISIONS - 1) { + if(n < size * 1000 || i >= UNIT_DIVISIONS - 1) { snprintf(buf, bsize, " %4.0f%s", n / size, bytes ? unit_bytes[i] : unit_bits[i]); break; }