Commit 8be3f3e

Anselm R. Garbe <garbeam@gmail.com>
2007-08-22 13:06:35
setlayout should perform strcmp's if arg != NULL, because Layout is local to screen.o
1 parent 5762e92
Changed files (1)
screen.c
@@ -3,6 +3,7 @@
 #include <regex.h>
 #include <stdio.h>
 #include <stdlib.h>
+#include <string.h>
 #include <X11/Xutil.h>
 
 /* static */
@@ -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;