projects
/
monky
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8121073
)
Fix battery_bar not parsing arguments correctly (sf: #2998034, lp: #569195)
author
Cesare Tirabassi
<norsetto@ubuntu.com>
Sun, 23 May 2010 09:08:08 +0000
(11:08 +0200)
committer
Cesare Tirabassi
<norsetto@ubuntu.com>
Sun, 23 May 2010 09:08:08 +0000
(11:08 +0200)
src/core.c
patch
|
blob
|
history
diff --git
a/src/core.c
b/src/core.c
index
253ad79
..
90ed09b
100644
(file)
--- a/
src/core.c
+++ b/
src/core.c
@@
-277,12
+277,13
@@
struct text_object *construct_text_object(const char *s, const char *arg, long
obj->data.s = strndup(bat, text_buffer_size);
END OBJ(battery_bar, 0)
char bat[64];
- if (arg) {
+
+ arg = scan_bar(obj, arg);
+ if (arg && strlen(arg)>0) {
sscanf(arg, "%63s", bat);
} else {
strcpy(bat, "BAT0");
}
- scan_bar(obj, bat);
obj->data.s = strndup(bat, text_buffer_size);
#endif /* !__OpenBSD__ */