Skip to content

Commit 19b9394

Browse files
committed
fix offset check
1 parent 7619d25 commit 19b9394

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

LibZipSharp/Xamarin.Tools.Zip/ZipArchive.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -790,8 +790,8 @@ internal static unsafe Int64 stream_callback (IntPtr state, IntPtr data, UInt64
790790
case SourceCommand.Seek:
791791
Native.zip_error_t error;
792792
Int64 offset = Native.zip_source_seek_compute_offset ((UInt64)stream.Position, (UInt64)stream.Length, data, len, out error);
793-
if (offset == -1)
794-
return -1;
793+
if (offset < 0)
794+
return offset;
795795
stream.Seek ((long)offset, SeekOrigin.Begin);
796796
break;
797797

0 commit comments

Comments
 (0)