ratpoison-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[RP] gselect segfault patch


From: Rupert Levene
Subject: [RP] gselect segfault patch
Date: Mon Jun 2 04:10:14 2003
User-agent: Mutt/1.5.3i

Tab-completions on gselect segfault if one of the groups has a null
name. Here's a possible fix:

Index: actions.c
===================================================================
RCS file: /cvsroot/ratpoison/ratpoison/src/actions.c,v
retrieving revision 1.171
diff -u -r1.171 actions.c
--- actions.c   27 May 2003 18:46:33 -0000      1.171
+++ actions.c   2 Jun 2003 11:01:27 -0000
@@ -3351,8 +3351,14 @@
       struct sbuf *s;
 
       s = sbuf_new (0);
-      sbuf_copy (s, cur->name);
-
+      if (cur->name)
+       {
+         sbuf_copy (s, cur->name);
+       }
+      else
+       {
+         sbuf_printf(s, "%d", cur->number);
+       }  
       list_add_tail (&s->node, list);
     }
 




reply via email to

[Prev in Thread] Current Thread [Next in Thread]