1
0
Fork 0
mirror of https://github.com/beefytech/Beef.git synced 2025-07-04 15:26:00 +02:00

Trimmed reflected iface method table

This commit is contained in:
Brian Fiete 2020-09-16 07:17:06 -07:00
parent 7fdce4b5af
commit 7e111329c7
5 changed files with 26 additions and 20 deletions

View file

@ -298,7 +298,10 @@ namespace System.Reflection
if (interfaceData == null)
return .Err(.InvalidTarget);
funcPtr = *(thisType.[Friend]mInterfaceMethodTable + interfaceData.mStartInterfaceTableIdx + mMethodData.mMethodIdx);
int ifaceMethodIdx = interfaceData.mStartInterfaceTableIdx + mMethodData.mMethodIdx;
if (ifaceMethodIdx >= thisType.[Friend]mInterfaceMethodCount)
return .Err(.InvalidTarget);
funcPtr = *(thisType.[Friend]mInterfaceMethodTable + ifaceMethodIdx);
}
ifaceOffset = mTypeInstance.[Friend]mMemberDataOffset;

View file

@ -688,7 +688,8 @@ namespace System.Reflection
int32 mInheritanceCount;
uint8 mInterfaceSlot;
uint8 mInterfaceCount;
uint8 mInterfaceCount;
int16 mInterfaceMethodCount;
int16 mMethodDataCount;
int16 mPropertyDataCount;
int16 mFieldDataCount;