mirror of
https://github.com/adamhathcock/sharpcompress.git
synced 2026-09-24 07:54:39 +00:00
add comment and change the same code in new Unpack50
This commit is contained in:
@@ -713,6 +713,8 @@ internal sealed partial class Unpack : BitInput, IRarUnpack, IDisposable
|
||||
|
||||
private void UnpWriteData(byte[] data, int offset, int size)
|
||||
{
|
||||
// allow destUnpSize == 0 here to ensure that 0 size writes
|
||||
// go through RarStream's Write so that Suspended is set correctly
|
||||
if (destUnpSize < 0)
|
||||
{
|
||||
return;
|
||||
|
||||
@@ -655,7 +655,9 @@ internal partial class Unpack
|
||||
|
||||
private void UnpWriteData(byte[] Data, size_t offset, size_t Size)
|
||||
{
|
||||
if (WrittenFileSize >= DestUnpSize)
|
||||
// allow WrittenFileSize == DestUnpSize here to ensure that 0 size writes
|
||||
// go through RarStream's Write so that Suspended is set correctly
|
||||
if (WrittenFileSize > DestUnpSize)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user