Re: [wmii] [BUG] Changing pages by selecting page number is impossible (patch enclosed)

From: Anselm R. Garbe <garbeam_AT_wmii.de>
Date: Wed, 21 Dec 2005 17:28:08 +0100

On Sat, Dec 17, 2005 at 06:19:09PM +0000, nard.list_AT_gmail.com wrote:
> Selecting pages (e.g. alt+n) is impossible with latest hg. If we inspect the code pageat the reason, I think, becomes apparent.
>
> unsigned int i = 0;
> Page *p;
> for (p = pages; p && i != idx; p = p->next);
> return p;
>
> i is not incremented, so eventually you reach a null pointer and it doesn't proceed. :)
>
> The following patch fixes it.
>
> diff -r ab2ac0697ccb cmd/wm/page.c
> --- a/cmd/wm/page.c Sat Dec 17 14:14:59 2005
> +++ b/cmd/wm/page.c Sat Dec 17 18:17:18 2005
> @@ -169,6 +169,6 @@
> {
> unsigned int i = 0;
> Page *p;
> - for (p = pages; p && i != idx; p = p->next);
> + for (p = pages; p && i != idx; p = p->next,i++);
> return p;
> }

Thx for the report, fixed.

Regards,

-- 
 Anselm R. Garbe  ><><  www.ebrag.de  ><><  GPG key: 0D73F361
Received on Wed Dec 21 2005 - 17:28:08 UTC

This archive was generated by hypermail 2.2.0 : Sun Jul 13 2008 - 15:59:40 UTC