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

adding comment on ArrayType CreateObject for count > 1

This commit is contained in:
xposure 2021-01-04 20:43:03 -05:00
parent f606006c39
commit 2cfcfd9113

View file

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