Commit 41f4c932 authored by pdw's avatar pdw

Further fixes to bandwidth display (how hard can it be... ?)

parent 4e6b940b
......@@ -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;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment