Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion src/conky.cc
Original file line number Diff line number Diff line change
Expand Up @@ -507,7 +507,11 @@ int spaced_print(char *buf, int size, const char *format, int width, ...) {
* - i.e., unsigned values between 0 and 100
* - respect the value of pad_percents */
int percent_print(char *buf, int size, unsigned value) {
return spaced_print(buf, size, "%u", pad_percents.get(*state), value);
int width = pad_percents.get(*state);
if(width == 0){
width = 3;
}
return spaced_print(buf, size, "%u", width, value);
}

/* converts from bytes to human readable format (K, M, G, T)
Expand Down
Loading