From 9c58be05b22d4c23d32fa4f8a5c364d6d88e127c Mon Sep 17 00:00:00 2001 From: Jaakko Keränen Date: Mon, 3 May 2021 13:43:30 +0300 Subject: Gopher: Line endings according to RFC 1436 --- src/gopher.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/gopher.c') diff --git a/src/gopher.c b/src/gopher.c index 6203f36d..2933a5d3 100644 --- a/src/gopher.c +++ b/src/gopher.c @@ -76,10 +76,10 @@ static iBool convertSource_Gopher_(iGopher *d) { for (;;) { /* Find the end of the line. */ iRangecc line = { body.start, body.start }; - while (line.end < body.end && !isLineTerminator_(line.end)) { + while (line.end < body.end - 1 && !isCRLFLineTerminator_(line.end)) { line.end++; } - if (line.end >= body.end || !isLineTerminator_(line.end)) { + if (line.end >= body.end - 1 || !isCRLFLineTerminator_(line.end)) { /* Not a complete line. More may be coming later. */ break; } -- cgit v1.2.3