ArraySegment.Count

This commit is contained in:
ousttrue
2021-12-22 15:47:18 +09:00
parent fa821ec603
commit 4d8cfb95d8

View File

@@ -21,7 +21,7 @@ namespace UniGLTF
/// </summary>
public static void CopyBytesToArray<T>(ArraySegment<byte> src, T[] dst) where T : struct
{
if (src.Array == null || dst == null)
if (src.Array == null || dst == null || src.Count == 0)
{
throw new System.ArgumentNullException();
}
@@ -50,7 +50,7 @@ namespace UniGLTF
/// </summary>
public static void CopyArrayToToBytes<T>(T[] src, ArraySegment<byte> dst) where T : struct
{
if (dst.Array == null || src == null)
if (dst.Array == null || src == null || dst.Count == 0)
{
throw new System.ArgumentNullException();
}