Re: [dwm] Bug in applyrules(Client *c) (hg tip)

From: Anselm R. Garbe <arg_AT_suckless.org>
Date: Tue, 18 Mar 2008 00:39:00 +0100

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
Received on Tue Mar 18 2008 - 00:39:00 UTC

This archive was generated by hypermail 2.2.0 : Sun Jul 13 2008 - 15:26:52 UTC