From f606006c3956f8f99efd81c62de7560b78f52e81 Mon Sep 17 00:00:00 2001 From: xposure Date: Mon, 4 Jan 2021 20:42:04 -0500 Subject: [PATCH] fixing the fix, we only need to memset when count is > 1 because Array1 holds the first element --- BeefLibs/corlib/src/Type.bf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/BeefLibs/corlib/src/Type.bf b/BeefLibs/corlib/src/Type.bf index ad12ed4e..c32bb5c7 100644 --- a/BeefLibs/corlib/src/Type.bf +++ b/BeefLibs/corlib/src/Type.bf @@ -1120,7 +1120,7 @@ namespace System.Reflection obj = Internal.UnsafeCastToObject(mem); obj.[Friend]mClassVData = (.)(void*)[Friend]mTypeClassVData; #endif - if(count > 0) + if(count > 1) Internal.MemSet((uint8*)Internal.UnsafeCastToPtr(obj) + [Friend]mInstSize, 0, [Friend]arraySize - [Friend]mInstSize); var array = (Array)obj; array.[Friend]mLength = count;