aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorSergey Poznyakoff <gray@gnu.org.ua>2004-12-16 19:41:55 +0000
committerSergey Poznyakoff <gray@gnu.org.ua>2004-12-16 19:41:55 +0000
commit12f7d9392625228a16d60bb46e4db0b58d1c47f7 (patch)
tree4788370895a69faad321b2ae774cab6f2aee8b63 /src
parent3d72e3fac13dcefaf5498a8f83c843b7d2a350a0 (diff)
downloadanubis-12f7d9392625228a16d60bb46e4db0b58d1c47f7.tar.gz
anubis-12f7d9392625228a16d60bb46e4db0b58d1c47f7.tar.bz2
(stream_readline): Minor fix
Diffstat (limited to 'src')
-rw-r--r--src/stream.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/stream.c b/src/stream.c
index a9e2f86..c1bf6af 100644
--- a/src/stream.c
+++ b/src/stream.c
@@ -228,7 +228,7 @@ stream_readline (struct net_stream *str, char *buf, size_t size,
if (count == 1)
{
- if (c == '\n' && n > 1 && ptr[-1] != '\r')
+ if (c == '\n' && (n == 1 || (n > 1 && ptr[-1] != '\r')))
*ptr++ = '\r';
*ptr++ = c;
if (c == '\n')

Return to:

Send suggestions and report system problems to the System administrator.