Xinqi Bao's Git
projects
/
dwm.git
/ commitdiff
summary
|
log
|
commit
|
diff
|
tree
raw
|
patch
| inline |
side by side
(parent:
e5765cd
)
pneubeck pointed out an obvious thing, that a second p = stext + strlen(stext) -...
author
Anselm R. Garbe <
[email protected]
>
Fri, 9 Feb 2007 13:56:19 +0000
(14:56 +0100)
committer
Anselm R. Garbe <
[email protected]
>
Fri, 9 Feb 2007 13:56:19 +0000
(14:56 +0100)
main.c
patch
|
blob
|
history
diff --git
a/main.c
b/main.c
index
1fd7ab1
..
02475e0
100644
(file)
--- 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);
}