forked from mirror/dwm
applied yet another proposal of Manuel
This commit is contained in:
parent
61a1910f91
commit
2210ea7e3b
1 changed files with 2 additions and 2 deletions
4
main.c
4
main.c
|
@ -284,8 +284,8 @@ main(int argc, char *argv[]) {
|
||||||
readin = False;
|
readin = False;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
stext[r - (stext[r - 1] == '\n' ? 1 : 0)] = '\0';
|
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 + strlen(stext) - 1; p >= stext && *p != '\n'; --p);
|
||||||
if(p > stext)
|
if(p > stext)
|
||||||
strncpy(stext, p + 1, sizeof stext);
|
strncpy(stext, p + 1, sizeof stext);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue