1
0
Fork 0
mirror of https://github.com/beefytech/Beef.git synced 2025-06-10 04:22:20 +02:00

fixing the fix, we only need to memset when count is > 1 because Array1 holds the first element

This commit is contained in:
xposure 2021-01-04 20:42:04 -05:00
parent bd4c60a251
commit f606006c39

View file

@ -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;