summaryrefslogtreecommitdiff
path: root/str.c
diff options
context:
space:
mode:
Diffstat (limited to 'str.c')
-rw-r--r--str.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/str.c b/str.c
index 4b597ccd51..8af06ad1a8 100644
--- a/str.c
+++ b/str.c
@@ -863,11 +863,10 @@ screamer:
bp = buf;
while ((i = getc(fp)) != EOF && (*bp++ = i) != newline && bp < bpe) ;
- *bp = '\0';
if (append)
- str_cat(str, buf);
+ str_ncat(str, buf, bp - buf);
else
- str_set(str, buf);
+ str_nset(str, buf, bp - buf);
if (i != EOF /* joy */
&&
(i != newline