diff options
author | arg@mig29 <unknown> | 2006-11-26 15:43:16 +0100 |
---|---|---|
committer | arg@mig29 <unknown> | 2006-11-26 15:43:16 +0100 |
commit | 2210ea7e3b0b2839ac7fb49c18d2731cb9e94e01 (patch) | |
tree | 4fd7ee25f2c3a4c48ab7438c2e31b7a47fa10ae2 | |
parent | 61a1910f91fe6aba428193087d6c3ff21374ee5e (diff) | |
download | dwm-2210ea7e3b0b2839ac7fb49c18d2731cb9e94e01.tar.gz dwm-2210ea7e3b0b2839ac7fb49c18d2731cb9e94e01.tar.bz2 dwm-2210ea7e3b0b2839ac7fb49c18d2731cb9e94e01.zip |
applied yet another proposal of Manuel
-rw-r--r-- | main.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -284,8 +284,8 @@ main(int argc, char *argv[]) { readin = False; break; default: - stext[r - (stext[r - 1] == '\n' ? 1 : 0)] = '\0'; - for(p = stext + strlen(stext) - 1; p > stext && *p != '\n'; --p); + 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); if(p > stext) strncpy(stext, p + 1, sizeof stext); } |