Skip to content

Commit 4d8c4a9

Browse files
authored
Merge PR #467: Allow seeking a PartialInputStream to the very end
1 parent 37c3a9e commit 4d8c4a9

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/ICSharpCode.SharpZipLib/Zip/ZipFile.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4229,7 +4229,7 @@ public override long Seek(long offset, SeekOrigin origin)
42294229
throw new ArgumentException("Negative position is invalid");
42304230
}
42314231

4232-
if (newPos >= end_)
4232+
if (newPos > end_)
42334233
{
42344234
throw new IOException("Cannot seek past end");
42354235
}
@@ -4266,7 +4266,7 @@ public override long Position
42664266
throw new ArgumentException("Negative position is invalid");
42674267
}
42684268

4269-
if (newPos >= end_)
4269+
if (newPos > end_)
42704270
{
42714271
throw new InvalidOperationException("Cannot seek past end");
42724272
}

0 commit comments

Comments
 (0)