From 0a9b989d2509de2ac2e60326b4923db67871f062 Mon Sep 17 00:00:00 2001 From: ousttrue Date: Thu, 14 Oct 2021 18:43:46 +0900 Subject: [PATCH] =?UTF-8?q?bug=20=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Assets/UniGLTF/Runtime/UniGLTF/IO/SpanLike.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Assets/UniGLTF/Runtime/UniGLTF/IO/SpanLike.cs b/Assets/UniGLTF/Runtime/UniGLTF/IO/SpanLike.cs index 9c7cdd3e0..71ce55e5f 100644 --- a/Assets/UniGLTF/Runtime/UniGLTF/IO/SpanLike.cs +++ b/Assets/UniGLTF/Runtime/UniGLTF/IO/SpanLike.cs @@ -475,10 +475,10 @@ namespace UniGLTF return new SpanLike(bytes, Marshal.SizeOf(), getset.Getter, getset.Setter); } - public static SpanLike Create(int count) where T : struct + public static SpanLike Create(int itemCount) where T : struct { var itemSize = Marshal.SizeOf(); - var array = new byte[count / itemSize]; + var array = new byte[itemCount * itemSize]; return Wrap(new ArraySegment(array)); }