Skip to content

Commit

Permalink
Merge pull request #645 from PanosKousidis/develop
Browse files Browse the repository at this point in the history
Handle the partial-byte-reads-in-stream breaking change in .NET6
  • Loading branch information
appel1 committed Aug 8, 2023
2 parents e6f1573 + b1ccc6b commit 93275f9
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public BiffReader(Stream stream)
return null;

byte[] buffer = recordLength < _buffer.Length ? _buffer : new byte[recordLength];
if (Stream.Read(buffer, 0, (int)recordLength) != recordLength)
if (Stream.ReadAtLeast(buffer, 0, (int)recordLength) != recordLength)
return null;

return ReadOverride(buffer, recordId, recordLength);
Expand Down

0 comments on commit 93275f9

Please sign in to comment.