diff options
author | Jaakko Keränen <jaakko.keranen@iki.fi> | 2021-05-03 13:43:30 +0300 |
---|---|---|
committer | Jaakko Keränen <jaakko.keranen@iki.fi> | 2021-05-03 13:43:30 +0300 |
commit | 9c58be05b22d4c23d32fa4f8a5c364d6d88e127c (patch) | |
tree | cb0fe3721c3c62c10027bb3d5decbe2641d9d373 | |
parent | 6572e18ded9435263f63459290175665ff690332 (diff) |
Gopher: Line endings according to RFC 1436
-rw-r--r-- | src/gopher.c | 4 |
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 | } |