summaryrefslogtreecommitdiff
path: root/Src/text.c
diff options
context:
space:
mode:
Diffstat (limited to 'Src/text.c')
-rw-r--r--Src/text.c5
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);
}
/**/