tpneubeck pointed out an obvious thing, that a second p = stext + strlen(stext)… | |
git clone git://src.adamsgaard.dk/dwm | |
Log | |
Files | |
Refs | |
README | |
LICENSE | |
--- | |
commit fd995dac78e34cc427abd7198af0db957a40664a | |
parent e5765cdd844125f7044d316b710b9a5a55117557 | |
Author: Anselm R. Garbe <[email protected]> | |
Date: Fri, 9 Feb 2007 14:56:19 +0100 | |
pneubeck pointed out an obvious thing, that a second p = stext + strlen(stext) … | |
Diffstat: | |
M main.c | 2 +- | |
1 file changed, 1 insertion(+), 1 deletion(-) | |
--- | |
diff --git a/main.c b/main.c | |
t@@ -273,7 +273,7 @@ main(int argc, char *argv[]) { | |
break; | |
default: | |
for(stext[r] = '\0', p = stext + strlen(stext)… | |
- for(p = stext + strlen(stext) - 1; p >= stext … | |
+ for(; p >= stext && *p != '\n'; --p); | |
if(p > stext) | |
strncpy(stext, p + 1, sizeof stext); | |
} |