From faacff414d6cb414c38b6f52f0c363b0e97a7b11 Mon Sep 17 00:00:00 2001 From: Adam Hathcock Date: Wed, 4 Feb 2026 14:57:17 +0000 Subject: [PATCH] changed checks to be less than or equal to zero --- src/SharpCompress/IO/SourceStream.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/SharpCompress/IO/SourceStream.cs b/src/SharpCompress/IO/SourceStream.cs index 844bb826..673285dd 100644 --- a/src/SharpCompress/IO/SourceStream.cs +++ b/src/SharpCompress/IO/SourceStream.cs @@ -217,7 +217,7 @@ public partial class SourceStream : Stream, IStreamStack // Safety check: if we have a zero-length stream and we're still not // making progress toward the target position, we're in an invalid state - if (currentLength == 0 && Current.Length == 0) + if (currentLength <= 0 && Current.Length <= 0) { // Both old and new stream have zero length - cannot make progress throw new InvalidOperationException(