On Mon, Mar 17, 2008 at 11:08:22PM +0100, Nibble wrote:
> Hi there,
> 
> If you have a rule with a NULL value in the "title" field you will fall into 
> a 
> loop.
> 
> So there is a bug in the function applyrules(Client *c) line 262,
> 
> if(strstr(c->name, r->title)
>       || (ch.res_class && r->class && strstr(ch.res_class, r->class))
>       || (ch.res_name && r->instance && strstr(ch.res_name, r->instance)))
> 
> should be:
> 
> if(c->name && r->title && strstr(c->name, r->title)
>       || (ch.res_class && r->class && strstr(ch.res_class, r->class))
>       || (ch.res_name && r->instance && strstr(ch.res_name, r->instance)))

Well, c->name is always true, but I agree on the r->title.

Thanks for the hint,
-- 
 Anselm R. Garbe >< http://www.suckless.org/ >< GPG key: 0D73F361

Reply via email to