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

kilobytes is the smallest unit and never has precision
This commit is contained in:
Hisham Muhammad 2015-08-29 19:45:47 -03:00
commit 2df36ee2f2
1 changed files with 3 additions and 0 deletions

View File

@ -157,6 +157,9 @@ int Meter_humanUnit(char* buffer, unsigned long int value, int size) {
++prefix;
}
if (*prefix == 'K')
precision = 0;
for (; precision > 0; precision--) {
powj *= 10;
if (value / powi < powj)