1
0
Fork 0
mirror of https://github.com/beefytech/Beef.git synced 2025-06-08 19:48:20 +02:00

CeOp_GetMethod_Virt fix with non-method-populated type

This commit is contained in:
Brian Fiete 2025-01-23 07:43:31 -08:00
parent 939c1079ee
commit 58979f6407

View file

@ -8647,7 +8647,10 @@ bool CeContext::Execute(CeFunction* startFunction, uint8* startStackPtr, uint8*
_Fail("Empty virtual table"); _Fail("Empty virtual table");
return false; return false;
} }
auto methodInstance = (BfMethodInstance*)valueType->mVirtualMethodTable[virtualIdx].mImplementingMethod; auto& methodRef = valueType->mVirtualMethodTable[virtualIdx].mImplementingMethod;
if (methodRef.mTypeInstance->mDefineState < BfTypeDefineState_DefinedAndMethodsSlotted)
ceModule->PopulateType(methodRef.mTypeInstance, BfPopulateType_DataAndMethods);
auto methodInstance = (BfMethodInstance*)methodRef;
auto callFunction = mCeMachine->GetPreparedFunction(methodInstance); auto callFunction = mCeMachine->GetPreparedFunction(methodInstance);
if (needsFunctionIds) if (needsFunctionIds)