Fix bug of unarchiving stored file in zip.

This commit is contained in:
Masataka SUMI
2021-06-28 02:10:33 +09:00
parent 7b3303b820
commit 90aa30ab29

View File

@@ -371,7 +371,9 @@ namespace UniGLTF.Zip
return new ArraySegment<byte>(Extract(found));
case CompressionMethod.Stored:
return new ArraySegment<byte>(found.Bytes, found.RelativeOffsetOfLocalFileHeader, found.CompressedSize);
var local = new LocalFileHeader(found.Bytes, found.RelativeOffsetOfLocalFileHeader);
var pos = local.Offset + local.Length;
return new ArraySegment<byte>(local.Bytes, pos, local.CompressedSize);
}
throw new NotImplementedException(found.CompressionMethod.ToString());