Commit 1ac517be authored by Hisham Muhammad's avatar Hisham Muhammad
Browse files

Fix padding in large numbers. (See #40)

parent 96858744
...@@ -337,7 +337,7 @@ static void Process_humanNumber(Process* this, RichString* str, unsigned long nu ...@@ -337,7 +337,7 @@ static void Process_humanNumber(Process* this, RichString* str, unsigned long nu
RichString_appendn(str, CRT_colors[LARGE_NUMBER], buffer, len); RichString_appendn(str, CRT_colors[LARGE_NUMBER], buffer, len);
return; return;
} else if (number >= (1000 * ONE_DECIMAL_M)) { } else if (number >= (1000 * ONE_DECIMAL_M)) {
len = snprintf(buffer, 10, "%3.1lfT ", (double)number / ONE_G); len = snprintf(buffer, 10, "%4.1lfT ", (double)number / ONE_G);
RichString_appendn(str, CRT_colors[LARGE_NUMBER], buffer, len); RichString_appendn(str, CRT_colors[LARGE_NUMBER], buffer, len);
return; return;
} }
...@@ -347,7 +347,7 @@ static void Process_humanNumber(Process* this, RichString* str, unsigned long nu ...@@ -347,7 +347,7 @@ static void Process_humanNumber(Process* this, RichString* str, unsigned long nu
RichString_appendn(str, CRT_colors[LARGE_NUMBER], buffer, len); RichString_appendn(str, CRT_colors[LARGE_NUMBER], buffer, len);
return; return;
} }
len = snprintf(buffer, 10, "%3.1lfG ", (double)number / ONE_M); len = snprintf(buffer, 10, "%4.1lfG ", (double)number / ONE_M);
RichString_appendn(str, CRT_colors[LARGE_NUMBER], buffer, len); RichString_appendn(str, CRT_colors[LARGE_NUMBER], buffer, len);
return; return;
} else if (number >= 100000) { } else if (number >= 100000) {
......
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