summaryrefslogtreecommitdiff
path: root/lib-src
diff options
context:
space:
mode:
authorRichard M. Stallman <rms@gnu.org>1997-05-06 19:30:49 +0000
committerRichard M. Stallman <rms@gnu.org>1997-05-06 19:30:49 +0000
commit88de784854565a5520c0decaea8489879fbe6e62 (patch)
tree5e18b54b0e4c09a039bbd9004787653626b36b61 /lib-src
parentae245e738bdea3225550767829923e51b6320de5 (diff)
downloademacs-88de784854565a5520c0decaea8489879fbe6e62.tar.gz
(getline): Don't miss CRLF pairs when the CR and LF are
read in separate blocks.
Diffstat (limited to 'lib-src')
-rw-r--r--lib-src/pop.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib-src/pop.c b/lib-src/pop.c
index 9292998e288..48e9df7b5d5 100644
--- a/lib-src/pop.c
+++ b/lib-src/pop.c
@@ -1316,7 +1316,9 @@ getline (server)
fprintf (stderr, "<<< %s\n", server->buffer);
return (server->buffer);
}
- search_offset += ret;
+ /* As above, the "- 1" here is to account for the fact that
+ we may have read a CR without its accompanying LF. */
+ search_offset += ret - 1;
}
}