mirror of
https://github.com/Llewellynvdm/conky.git
synced 2024-12-26 04:17:33 +00:00
conky.cc: Fix for https://github.com/brndnmtthws/conky/issues/352 (#540)
This commit is contained in:
parent
388f47f20e
commit
fa5e56720f
@ -746,7 +746,7 @@ void human_readable(long long num, char *buf, int size) {
|
||||
float fnum;
|
||||
int precision;
|
||||
int width;
|
||||
const char *format;
|
||||
static const char *const format = "%.*f%.1s";
|
||||
|
||||
/* Possibly just output as usual, for example for stdout usage */
|
||||
if (!format_human_readable.get(*state)) {
|
||||
@ -755,10 +755,8 @@ void human_readable(long long num, char *buf, int size) {
|
||||
}
|
||||
if (short_units.get(*state)) {
|
||||
width = 5;
|
||||
format = "%.*f%.1s";
|
||||
} else {
|
||||
width = 7;
|
||||
format = "%.*f%-3s";
|
||||
}
|
||||
|
||||
if (llabs(num) < 1000LL) {
|
||||
|
Loading…
Reference in New Issue
Block a user