JasonWoof Got questions, comments, patches, etc.? Contact Jason Woofenden
during writing 2wm.1 I noticed some bugs in dwm.1
[dwm.git] / main.c
diff --git a/main.c b/main.c
index 68f60c7..02475e0 100644 (file)
--- a/main.c
+++ b/main.c
 /* extern */
 
 char stext[256];
-Bool *seltag;
 int bh, bmw, screen, sx, sy, sw, sh, wax, way, waw, wah;
 unsigned int master, nmaster, ntags, numlockmask;
 Atom wmatom[WMLast], netatom[NetLast];
 Bool running = True;
+Bool *seltag;
 Bool selscreen = True;
 Client *clients = NULL;
 Client *sel = NULL;
@@ -273,7 +273,7 @@ main(int argc, char *argv[]) {
                                break;
                        default:
                                for(stext[r] = '\0', p = stext + strlen(stext) - 1; p >= stext && *p == '\n'; *p-- = '\0');
-                               for(p = stext + strlen(stext) - 1; p >= stext && *p != '\n'; --p);
+                               for(; p >= stext && *p != '\n'; --p);
                                if(p > stext)
                                        strncpy(stext, p + 1, sizeof stext);
                        }