* update Get/SetFieldValue
* get the address of the instance
* Update src/coreclr/vm/invokeutil.cpp
---------
Co-authored-by: Mikelle <mirogers@microsoft.com>
Co-authored-by: Jan Kotas <jkotas@microsoft.com>
{
void* pFieldData;
if (pField->IsStatic())
+ {
pFieldData = pField->GetCurrentStaticAddress();
+ }
else
- pFieldData = (*((BYTE**)target)) + pField->GetOffset() + sizeof(Object);
+ {
+ pFieldData = pField->GetInstanceAddress(*target);
+ }
if (*valueObj == NULL)
InitValueClass(pFieldData, pMT);
GCPROTECT_BEGIN(obj);
// calculate the offset to the field...
if (pField->IsStatic())
+ {
p = pField->GetCurrentStaticAddress();
- else {
- p = (*((BYTE**)target)) + pField->GetOffset() + sizeof(Object);
+ }
+ else
+ {
+ p = pField->GetInstanceAddress(*target);
}
GCPROTECT_END();