aboutsummaryrefslogtreecommitdiffstats
path: root/g10/textfilter.c
diff options
context:
space:
mode:
authorWerner Koch <[email protected]>1998-07-08 09:29:43 +0000
committerWerner Koch <[email protected]>1998-07-08 09:29:43 +0000
commit5aed77d1dbd95a8a0be4d579fd023775ddc85223 (patch)
treee9b043aa908c90590b4d2f78639fd24b0a2b83c7 /g10/textfilter.c
parentAdded new key infos (diff)
downloadgnupg-5aed77d1dbd95a8a0be4d579fd023775ddc85223.tar.gz
gnupg-5aed77d1dbd95a8a0be4d579fd023775ddc85223.zip
fixed clearsig stuff
Diffstat (limited to 'g10/textfilter.c')
-rw-r--r--g10/textfilter.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/g10/textfilter.c b/g10/textfilter.c
index c42624eff..804b48505 100644
--- a/g10/textfilter.c
+++ b/g10/textfilter.c
@@ -51,8 +51,11 @@ read_line( byte *buf, size_t *r_buflen, IOBUF a )
for(c=0, n=0; n < buflen && (c=iobuf_get2(a)) != -1 && c != '\n'; )
buf[n++] = c;
buf[n] = 0;
- if( c == -1 )
+ if( c == -1 ) {
rc = -1;
+ if( !n || buf[n-1] != '\n' )
+ no_lf = 1;
+ }
else if( c != '\n' ) {
IOBUF b = iobuf_temp();
while( (c=iobuf_get2(a)) != -1 && c != '\n' ) {