From eb5db176fa4f56cde730e0b67ee66e2c25d498e4 Mon Sep 17 00:00:00 2001 From: Morilli <35152647+Morilli@users.noreply.github.com> Date: Tue, 11 Feb 2025 11:21:51 +0100 Subject: [PATCH] revert change to rar5 code ... yeah... apparently the thing that fixes rar3 code breaks rar5 code --- .../Compressors/Rar/UnpackV2017/Unpack.unpack50_cpp.cs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/SharpCompress/Compressors/Rar/UnpackV2017/Unpack.unpack50_cpp.cs b/src/SharpCompress/Compressors/Rar/UnpackV2017/Unpack.unpack50_cpp.cs index a2e49686..143e3d31 100644 --- a/src/SharpCompress/Compressors/Rar/UnpackV2017/Unpack.unpack50_cpp.cs +++ b/src/SharpCompress/Compressors/Rar/UnpackV2017/Unpack.unpack50_cpp.cs @@ -655,9 +655,7 @@ internal partial class Unpack private void UnpWriteData(byte[] Data, size_t offset, size_t Size) { - // allow WrittenFileSize == DestUnpSize here to ensure that 0 size writes - // go through RarStream's Write so that Suspended is set correctly - if (WrittenFileSize > DestUnpSize) + if (WrittenFileSize >= DestUnpSize) { return; }