[wmii] segfault when selecting previous page

From: Anthony Martin <ality_AT_pbrane.org>
Date: Wed, 1 Mar 2006 22:26:49 -0800

This fixes the crash resulting from trying to switch to the previous
page when page 0 is selected. It has the added benefit (at least IMO)
of page 0 when cycling through pages. This is nice if page 0 is being
used as a detach buffer or "yard" as suggested in IRC.

#begin_diff

diff -r d39fe41be1f9 cmd/wm/page.c
--- a/cmd/wm/page.c Wed Mar 1 17:37:33 2006 +0100
+++ b/cmd/wm/page.c Wed Mar 1 22:06:09 2006 -0800
@@ -155,7 +155,7 @@ select_page(char *arg)
     if(!npage)
         return;
     if(!strncmp(arg, "prev", 5)) {
- if(new == 1)
+ if(new <= 1)
                        new = npage;
                new--;
     } else if(!strncmp(arg, "next", 5)) {

#end_diff

regards,
  ality

-- 
"The right to be left alone is indeed the beginning of all freedom."
Received on Thu Mar 02 2006 - 07:26:55 UTC

This archive was generated by hypermail 2.2.0 : Sun Jul 13 2008 - 16:00:29 UTC