aboutsummaryrefslogtreecommitdiffstats
path: root/draw.c
diff options
context:
space:
mode:
authorgotmor <gotmor@f2baff5b-bf2c-0410-a398-912abdc3d8b2>2010-06-13 16:40:14 +0000
committergotmor <gotmor@f2baff5b-bf2c-0410-a398-912abdc3d8b2>2010-06-13 16:40:14 +0000
commiteb0914e20b1fa429c05c3bab55f2e28864ef2b27 (patch)
tree975299b92ca9d57d5eeb94151b266db4e23592f9 /draw.c
parentdb58aac6a88f369fc109005548ad9170ee8b7720 (diff)
downloaddzen-eb0914e20b1fa429c05c3bab55f2e28864ef2b27.tar.gz
dzen-eb0914e20b1fa429c05c3bab55f2e28864ef2b27.zip
fix parsing in ^ca(), thanks to Michael Stapelberg
git-svn-id: http://dzen.googlecode.com/svn/trunk@269 f2baff5b-bf2c-0410-a398-912abdc3d8b2
Diffstat (limited to 'draw.c')
-rw-r--r--draw.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/draw.c b/draw.c
index 24f7cf8..e6756f6 100644
--- a/draw.c
+++ b/draw.c
@@ -218,7 +218,10 @@ setcolor(Drawable *pm, int x, int width, long tfg, long tbg, int reverse, int no
int
get_sens_area(char *s, int *b, char *cmd) {
memset(cmd, 0, 1024);
- sscanf(s, "%5d,%1024c", b, cmd);
+ sscanf(s, "%5d", b);
+ char *comma = strchr(s, ',');
+ if (comma != NULL)
+ strncpy(cmd, comma+1, 1024);
return 0;
}