From: Nikolas Garofil Date: Sun, 11 Apr 2010 17:49:27 +0000 (+0200) Subject: Bugfix: battery_bar should also work without argument X-Git-Url: http://vcs.maemo.org/git/?a=commitdiff_plain;ds=sidebyside;h=9a334e4462bc1b9fb72b0bc963dde7700c994f37;p=monky Bugfix: battery_bar should also work without argument --- diff --git a/src/core.c b/src/core.c index 32aa33a..a7132c6 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__ */