mirror of
https://github.com/xzeldon/htop.git
synced 2025-04-05 02:47:07 +03:00
Merge pull request #254 from eworm-de/kilobyte-precision
kilobytes is the smallest unit and never has precision
This commit is contained in:
commit
2df36ee2f2
3
Meter.c
3
Meter.c
@ -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)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user