mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-09 12:02:21 +02:00
Fixed type resolution infinite loop
This commit is contained in:
parent
6b9bb361f9
commit
37e4c589b0
2 changed files with 12 additions and 5 deletions
|
@ -6860,13 +6860,18 @@ BfType* BfModule::ResolveTypeDef(BfTypeDef* typeDef, BfPopulateType populateType
|
|||
return resolvedtypeDefType;
|
||||
}
|
||||
|
||||
// Get BaseClass even when we haven't populated the type yet2
|
||||
// Get BaseClass even when we haven't populated the type yet
|
||||
BfTypeInstance* BfModule::GetBaseType(BfTypeInstance* typeInst)
|
||||
{
|
||||
if ((mContext->mCurTypeState != NULL) && (mContext->mCurTypeState->mTypeInstance == typeInst))
|
||||
if (typeInst->mBaseType == NULL)
|
||||
{
|
||||
if (typeInst->mBaseType == NULL)
|
||||
return NULL;
|
||||
auto checkTypeState = mContext->mCurTypeState;
|
||||
while (checkTypeState != NULL)
|
||||
{
|
||||
if (checkTypeState->mTypeInstance == typeInst)
|
||||
return NULL;
|
||||
checkTypeState = checkTypeState->mPrevState;
|
||||
}
|
||||
}
|
||||
|
||||
if ((typeInst->mBaseType == NULL) && (typeInst != mContext->mBfObjectType))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue