summaryrefslogtreecommitdiff
path: root/src/gopher.c
diff options
context:
space:
mode:
authorJaakko Keränen <jaakko.keranen@iki.fi>2021-05-03 13:43:30 +0300
committerJaakko Keränen <jaakko.keranen@iki.fi>2021-05-03 13:43:30 +0300
commit9c58be05b22d4c23d32fa4f8a5c364d6d88e127c (patch)
treecb0fe3721c3c62c10027bb3d5decbe2641d9d373 /src/gopher.c
parent6572e18ded9435263f63459290175665ff690332 (diff)
Gopher: Line endings according to RFC 1436
Diffstat (limited to 'src/gopher.c')
-rw-r--r--src/gopher.c4
1 files changed, 2 insertions, 2 deletions
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) {
76 for (;;) { 76 for (;;) {
77 /* Find the end of the line. */ 77 /* Find the end of the line. */
78 iRangecc line = { body.start, body.start }; 78 iRangecc line = { body.start, body.start };
79 while (line.end < body.end && !isLineTerminator_(line.end)) { 79 while (line.end < body.end - 1 && !isCRLFLineTerminator_(line.end)) {
80 line.end++; 80 line.end++;
81 } 81 }
82 if (line.end >= body.end || !isLineTerminator_(line.end)) { 82 if (line.end >= body.end - 1 || !isCRLFLineTerminator_(line.end)) {
83 /* Not a complete line. More may be coming later. */ 83 /* Not a complete line. More may be coming later. */
84 break; 84 break;
85 } 85 }