aboutsummaryrefslogtreecommitdiffstats
path: root/g10/armor.c
diff options
context:
space:
mode:
authorWerner Koch <[email protected]>1998-04-30 14:06:01 +0000
committerWerner Koch <[email protected]>1998-04-30 14:06:01 +0000
commit448f8e53fe3e5d5ac54fe7151e512acbb6114ad5 (patch)
tree5cb5878aaff2738558b1355f5f17b48d300cb145 /g10/armor.c
parentNEw (diff)
downloadgnupg-448f8e53fe3e5d5ac54fe7151e512acbb6114ad5.tar.gz
gnupg-448f8e53fe3e5d5ac54fe7151e512acbb6114ad5.zip
*** empty log message ***
Diffstat (limited to '')
-rw-r--r--g10/armor.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/g10/armor.c b/g10/armor.c
index 7617415cb..462dc17b3 100644
--- a/g10/armor.c
+++ b/g10/armor.c
@@ -976,7 +976,7 @@ armor_filter( void *opaque, int control,
iobuf_put(a, c);
c = bintoasc[radbuf[2]&077];
iobuf_put(a, c);
- if( ++idx2 > (72/4) ) {
+ if( ++idx2 >= (72/4) ) {
iobuf_put(a, '\n');
idx2=0;
}
@@ -1015,10 +1015,13 @@ armor_filter( void *opaque, int control,
iobuf_put(a, c);
iobuf_put(a, '=');
}
- ++idx2;
+ if( ++idx2 >= (72/4) ) {
+ iobuf_put(a, '\n');
+ idx2=0;
+ }
}
/* may need a linefeed */
- if( idx2 <= (72/4) )
+ if( idx2 )
iobuf_put(a, '\n');
/* write the CRC */
iobuf_put(a, '=');