tsetlayout should perform strcmp's if arg != NULL, because Layout is local to screen.o - dwm - [fork] customized build of dwm, the dynamic window manager
(HTM) git clone git://src.adamsgaard.dk/dwm
(DIR) Log
(DIR) Files
(DIR) Refs
(DIR) README
(DIR) LICENSE
---
(DIR) commit 8be3f3ec9eec07ddf1622a04874e82730f108a26
(DIR) parent 5762e92994ab30aa5cc6e381e897fe847974b7c5
(HTM) Author: Anselm R. Garbe <garbeam@gmail.com>
Date: Wed, 22 Aug 2007 19:06:35 +0200
setlayout should perform strcmp's if arg != NULL, because Layout is local to screen.o
Diffstat:
M screen.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
---
(DIR) diff --git a/screen.c b/screen.c
t@@ -3,6 +3,7 @@
#include <regex.h>
#include <stdio.h>
#include <stdlib.h>
+#include <string.h>
#include <X11/Xutil.h>
/* static */
t@@ -245,7 +246,7 @@ setlayout(const char *arg) {
}
else {
for(i = 0; i < nlayouts; i++)
- if(arg == layouts[i].symbol)
+ if(!strcmp(arg, layouts[i].symbol))
break;
if(i == nlayouts)
return;