mirror of
https://github.com/Llewellynvdm/conky.git
synced 2024-12-26 20:31:17 +00:00
Bugfix: battery_bar should also work without argument
This commit is contained in:
parent
f7dcc664d7
commit
9a334e4462
@ -280,11 +280,11 @@ struct text_object *construct_text_object(const char *s, const char *arg, long
|
||||
END OBJ(battery_bar, 0)
|
||||
char bat[64];
|
||||
if (arg) {
|
||||
arg = scan_bar(obj, arg);
|
||||
sscanf(arg, "%63s", bat);
|
||||
} else {
|
||||
strcpy(bat, "BAT0");
|
||||
}
|
||||
scan_bar(obj, bat);
|
||||
obj->data.s = strndup(bat, text_buffer_size);
|
||||
#endif /* !__OpenBSD__ */
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user