diff options
Diffstat (limited to 'Src')
-rw-r--r-- | Src/text.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/Src/text.c b/Src/text.c index ab6ca5eb9..8823a69bc 100644 --- a/Src/text.c +++ b/Src/text.c @@ -58,6 +58,7 @@ static void taddstr(char *s) { int sl = strlen(s); + char c; while (tptr + sl >= tlim) { int x = tptr - tbuf; @@ -68,8 +69,8 @@ taddstr(char *s) tlim = tbuf + tsiz; tptr = tbuf + x; } - strcpy(tptr, s); - tptr += sl; + while ((c = *s++)) + *tptr++ = (c == '\n' ? ' ' : c); } /**/ |