mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-11 04:52:21 +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:
parent
bd4c60a251
commit
f606006c39
1 changed files with 1 additions and 1 deletions
|
@ -1120,7 +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
|
||||||
if(count > 0)
|
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;
|
||||||
array.[Friend]mLength = count;
|
array.[Friend]mLength = count;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue