Skip to content

Commit eb0914e

Browse files
author
gotmor
committed
fix parsing in ^ca(), thanks to Michael Stapelberg
git-svn-id: http://dzen.googlecode.com/svn/trunk@269 f2baff5b-bf2c-0410-a398-912abdc3d8b2
1 parent db58aac commit eb0914e

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

draw.c

+4-1
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,10 @@ setcolor(Drawable *pm, int x, int width, long tfg, long tbg, int reverse, int no
218218
int
219219
get_sens_area(char *s, int *b, char *cmd) {
220220
memset(cmd, 0, 1024);
221-
sscanf(s, "%5d,%1024c", b, cmd);
221+
sscanf(s, "%5d", b);
222+
char *comma = strchr(s, ',');
223+
if (comma != NULL)
224+
strncpy(cmd, comma+1, 1024);
222225

223226
return 0;
224227
}

0 commit comments

Comments
 (0)