Commit 2df36ee2 authored by Hisham Muhammad's avatar Hisham Muhammad
Browse files

Merge pull request #254 from eworm-de/kilobyte-precision

kilobytes is the smallest unit and never has precision
parents a859e920 bf456972
...@@ -157,6 +157,9 @@ int Meter_humanUnit(char* buffer, unsigned long int value, int size) { ...@@ -157,6 +157,9 @@ int Meter_humanUnit(char* buffer, unsigned long int value, int size) {
++prefix; ++prefix;
} }
if (*prefix == 'K')
precision = 0;
for (; precision > 0; precision--) { for (; precision > 0; precision--) {
powj *= 10; powj *= 10;
if (value / powi < powj) if (value / powi < powj)
......
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