From 90aa30ab29fcd27f1799afcd1c129462125952dc Mon Sep 17 00:00:00 2001 From: Masataka SUMI Date: Mon, 28 Jun 2021 02:10:33 +0900 Subject: [PATCH] Fix bug of unarchiving stored file in zip. --- Assets/UniGLTF/Runtime/UniGLTF/IO/ZipArchiveStorage.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Assets/UniGLTF/Runtime/UniGLTF/IO/ZipArchiveStorage.cs b/Assets/UniGLTF/Runtime/UniGLTF/IO/ZipArchiveStorage.cs index ea05e92b8..9a15ace8b 100644 --- a/Assets/UniGLTF/Runtime/UniGLTF/IO/ZipArchiveStorage.cs +++ b/Assets/UniGLTF/Runtime/UniGLTF/IO/ZipArchiveStorage.cs @@ -371,7 +371,9 @@ namespace UniGLTF.Zip return new ArraySegment(Extract(found)); case CompressionMethod.Stored: - return new ArraySegment(found.Bytes, found.RelativeOffsetOfLocalFileHeader, found.CompressedSize); + var local = new LocalFileHeader(found.Bytes, found.RelativeOffsetOfLocalFileHeader); + var pos = local.Offset + local.Length; + return new ArraySegment(local.Bytes, pos, local.CompressedSize); } throw new NotImplementedException(found.CompressionMethod.ToString());