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

Merge remote-tracking branch 'origin/master'

This commit is contained in:
Brian Fiete 2021-01-06 09:04:58 -08:00
commit 2a764a14c7

View file

@ -1120,7 +1120,9 @@ namespace System.Reflection
obj = Internal.UnsafeCastToObject(mem);
obj.[Friend]mClassVData = (.)(void*)[Friend]mTypeClassVData;
#endif
Internal.MemSet((uint8*)Internal.UnsafeCastToPtr(obj) + [Friend]mInstSize, 0, [Friend]arraySize - [Friend]mInstSize);
//Array1 holds the first element, we only want to set the remaining elements
if(count > 1)
Internal.MemSet((uint8*)Internal.UnsafeCastToPtr(obj) + [Friend]mInstSize, 0, [Friend]arraySize - [Friend]mInstSize);
var array = (Array)obj;
array.[Friend]mLength = count;
return obj;