1
0
mirror of https://github.com/Llewellynvdm/conky.git synced 2024-12-27 12:42:41 +00:00

Bugfix: battery_bar should also work without argument

This commit is contained in:
Nikolas Garofil 2010-04-11 19:49:27 +02:00
parent f7dcc664d7
commit 9a334e4462

View File

@ -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__ */