From 9a334e4462bc1b9fb72b0bc963dde7700c994f37 Mon Sep 17 00:00:00 2001 From: Nikolas Garofil Date: Sun, 11 Apr 2010 19:49:27 +0200 Subject: [PATCH] Bugfix: battery_bar should also work without argument --- src/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core.c b/src/core.c index 32aa33a0..a7132c6c 100644 --- a/src/core.c +++ b/src/core.c @@ -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__ */