Skip to content

Commit 3d04883

Browse files
Remove unnecessary bool check in ZipArchive ReadCentralDirectory (#113784)
Co-authored-by: Carlos Sánchez López <1175054+carlossanlop@users.noreply.github.com>
1 parent 7efe7f7 commit 3d04883

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

  • src/libraries/System.IO.Compression/src/System/IO/Compression

src/libraries/System.IO.Compression/src/System/IO/Compression/ZipArchive.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -524,8 +524,7 @@ private void ReadCentralDirectory()
524524
ReadOnlySpan<byte> sizedFileBuffer = fileBufferSpan.Slice(0, currBytesRead);
525525

526526
// the buffer read must always be large enough to fit the constant section size of at least one header
527-
continueReadingCentralDirectory = continueReadingCentralDirectory
528-
&& sizedFileBuffer.Length >= ZipCentralDirectoryFileHeader.BlockConstantSectionSize;
527+
continueReadingCentralDirectory = sizedFileBuffer.Length >= ZipCentralDirectoryFileHeader.BlockConstantSectionSize;
529528

530529
while (continueReadingCentralDirectory
531530
&& currPosition + ZipCentralDirectoryFileHeader.BlockConstantSectionSize < sizedFileBuffer.Length)

0 commit comments

Comments
 (0)