Skip to content

Commit d819c9e

Browse files
authored
Merge pull request #133 from charlesgriffiths/patch-1
PendingBuffer ToByteArray() to return all bytes
2 parents 8ab0251 + c957965 commit d819c9e

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

ICSharpCode.SharpZipLib/Zip/Compression/PendingBuffer.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -245,6 +245,8 @@ public int Flush(byte[] output, int offset, int length)
245245
/// </returns>
246246
public byte[] ToByteArray()
247247
{
248+
AlignToByte();
249+
248250
byte[] result = new byte[end - start];
249251
System.Array.Copy(buffer_, start, result, 0, result.Length);
250252
start = 0;

0 commit comments

Comments
 (0)