mirror of
https://github.com/Llewellynvdm/conky.git
synced 2024-11-18 02:55:12 +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;
|
float fnum;
|
||||||
int precision;
|
int precision;
|
||||||
int width;
|
int width;
|
||||||
const char *format;
|
static const char *const format = "%.*f%.1s";
|
||||||
|
|
||||||
/* Possibly just output as usual, for example for stdout usage */
|
/* Possibly just output as usual, for example for stdout usage */
|
||||||
if (!format_human_readable.get(*state)) {
|
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)) {
|
if (short_units.get(*state)) {
|
||||||
width = 5;
|
width = 5;
|
||||||
format = "%.*f%.1s";
|
|
||||||
} else {
|
} else {
|
||||||
width = 7;
|
width = 7;
|
||||||
format = "%.*f%-3s";
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (llabs(num) < 1000LL) {
|
if (llabs(num) < 1000LL) {
|
||||||
|
Loading…
Reference in New Issue
Block a user