mirror of
https://github.com/adamhathcock/sharpcompress.git
synced 2026-07-13 04:27:00 +00:00
bugfix: eliminate spurious rar crc exception when Read() is called with count = 0 (#313)
This commit is contained in:
@@ -31,7 +31,7 @@ namespace SharpCompress.Compressors.Rar {
|
||||
{
|
||||
currentCrc = RarCRC.CheckCrc(currentCrc, buffer, offset, result);
|
||||
}
|
||||
else if (GetCrc() != readStream.CurrentCrc)
|
||||
else if (GetCrc() != readStream.CurrentCrc && count != 0)
|
||||
{
|
||||
// NOTE: we use the last FileHeader in a multipart volume to check CRC
|
||||
throw new InvalidFormatException("file crc mismatch");
|
||||
|
||||
Reference in New Issue
Block a user