commit 37768b3d4ec5a950a4e8cf7b5762b1489d5b6399
parent 1b6ee8951ac50aba4d75ce2c132077060a1a471c
Author: Denis Grelich <denisg@suckless.org>
Date: Sat, 23 Dec 2006 20:09:55 +0100
fixed a bug that prepends a + to the tags string of all frames; also fixes the bug that gives clients that are started without selecting a tag to view the tag "NULL"
Diffstat:
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/client.c b/client.c
@@ -715,7 +715,8 @@ apply_tags(Client *c, const char *tags) {
if(!j) toks[j++] = "NULL";
for(i=0, n=0; i < j && len > 1; i++)
if(!n || strcmp(toks[i], toks[n-1])) {
- strncat(c->tags, "+", len);
+ if(i)
+ strncat(c->tags, "+", len);
len -= strlen(c->tags);
strncat(c->tags, toks[i], len);
len -= strlen(c->tags);