diff options
Diffstat (limited to 'crypto/bzip2/src/CBZip2OutputStream.cs')
-rw-r--r-- | crypto/bzip2/src/CBZip2OutputStream.cs | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/crypto/bzip2/src/CBZip2OutputStream.cs b/crypto/bzip2/src/CBZip2OutputStream.cs index ffac073fb..6e9d86bba 100644 --- a/crypto/bzip2/src/CBZip2OutputStream.cs +++ b/crypto/bzip2/src/CBZip2OutputStream.cs @@ -423,7 +423,10 @@ namespace Org.BouncyCastle.Apache.Bzip2 WriteRun(); } currentChar = -1; - EndBlock(); + if (last >= 0) + { + EndBlock(); + } EndCompression(); finished = true; Flush(); |