From 2a074f555425c89a7e986622383df4198ba45ab2 Mon Sep 17 00:00:00 2001 From: stefanof95 <50569864+stefanof95@users.noreply.github.com> Date: Fri, 26 Nov 2021 12:10:49 +0100 Subject: [PATCH] Update StreamWrappers.cs --- SevenZip/StreamWrappers.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/SevenZip/StreamWrappers.cs b/SevenZip/StreamWrappers.cs index 1f35f3c..662862e 100644 --- a/SevenZip/StreamWrappers.cs +++ b/SevenZip/StreamWrappers.cs @@ -415,7 +415,7 @@ public int Write(byte[] data, uint size, IntPtr processedSize) int offset = 0; var originalSize = (int) size; Position += size; - _overallLength = Math.Max(Position + 1, _overallLength); + _overallLength = Math.Max(Position, _overallLength); while (size > _volumeSize - Streams[CurrentStream].Position) { var count = (int) (_volumeSize - Streams[CurrentStream].Position); @@ -493,4 +493,4 @@ private void OnBytesWritten(IntEventArgs e) } } #endif -} \ No newline at end of file +}