mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-16 23:34:10 +02:00
Fixed FieldInfo.SetValue for objects
This commit is contained in:
parent
767ced3563
commit
21e2269d43
2 changed files with 13 additions and 2 deletions
|
@ -76,7 +76,10 @@ namespace System.Reflection
|
|||
|
||||
if (valueType == fieldType)
|
||||
{
|
||||
Internal.MemCpy(fieldDataAddr, valueDataAddr, fieldType.[Friend]mSize);
|
||||
if (valueType.IsObject)
|
||||
*((void**)fieldDataAddr) = Internal.UnsafeCastToPtr(value);
|
||||
else
|
||||
Internal.MemCpy(fieldDataAddr, valueDataAddr, fieldType.[Friend]mSize);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue