setlayout should perform strcmp's if arg != NULL, because Layout is local to screen.o
8be3f3ec
1 file(s) · +2 −1
| 3 | 3 | #include <regex.h> |
|
| 4 | 4 | #include <stdio.h> |
|
| 5 | 5 | #include <stdlib.h> |
|
| 6 | + | #include <string.h> |
|
| 6 | 7 | #include <X11/Xutil.h> |
|
| 7 | 8 | ||
| 8 | 9 | /* static */ |
|
| 245 | 246 | } |
|
| 246 | 247 | else { |
|
| 247 | 248 | for(i = 0; i < nlayouts; i++) |
|
| 248 | - | if(arg == layouts[i].symbol) |
|
| 249 | + | if(!strcmp(arg, layouts[i].symbol)) |
|
| 249 | 250 | break; |
|
| 250 | 251 | if(i == nlayouts) |
|
| 251 | 252 | return; |
|