hotfix of idxoftag 2c2063bc
anselm@anselm1 · 2008-03-22 16:53 1 file(s) · +2 −2
dwm.c +2 −2
259 259
	XGetClassHint(dpy, c->win, &ch);
260 260
	for(i = 0; i < LENGTH(rules); i++) {
261 261
		r = &rules[i];
262 -
		if(r->title && strstr(c->name, r->title)
262 +
		if((r->title && strstr(c->name, r->title))
263 263
		|| (ch.res_class && r->class && strstr(ch.res_class, r->class))
264 264
		|| (ch.res_name && r->instance && strstr(ch.res_name, r->instance)))
265 265
		{
860 860
idxoftag(const char *t) {
861 861
	unsigned int i;
862 862
863 -
	for(i = 0; (i < LENGTH(tags)) && strcmp(tags[i], t); i++);
863 +
	for(i = 0; (i < LENGTH(tags)) && t && strcmp(tags[i], t); i++);
864 864
	return (i < LENGTH(tags)) ? i : 0;
865 865
}
866 866