X-Git-Url: https://jasonwoof.com/gitweb/?a=blobdiff_plain;f=main.c;h=02475e0f102f4880622b2076ac4a17368132e8ab;hb=fd995dac78e34cc427abd7198af0db957a40664a;hp=1fd7ab1329df38bff3ebfb78d6eed4122fe12617;hpb=e5765cdd844125f7044d316b710b9a5a55117557;p=dwm.git diff --git a/main.c b/main.c index 1fd7ab1..02475e0 100644 --- a/main.c +++ b/main.c @@ -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); }