summaryrefslogtreecommitdiffstats
path: root/Meter.c
diff options
context:
space:
mode:
authorChristian Hesse <mail@eworm.de>2015-08-28 10:40:33 +0200
committerChristian Hesse <mail@eworm.de>2015-08-29 21:22:46 +0200
commitbf456972b798b9668a60c17853c01ab835045a63 (patch)
tree01105e3a82fa5178e890ab24679ddb0924d454a0 /Meter.c
parenta859e9204cd348f0ef7633f427e47d0a45451b91 (diff)
kilobytes is the smallest unit and never has precision
Signed-off-by: Christian Hesse <mail@eworm.de>
Diffstat (limited to 'Meter.c')
-rw-r--r--Meter.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/Meter.c b/Meter.c
index ee8fbf78..8792f93d 100644
--- a/Meter.c
+++ b/Meter.c
@@ -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)

© 2014-2024 Faster IT GmbH | imprint | privacy policy