1
0
Fork 0
mirror of https://github.com/beefytech/Beef.git synced 2025-06-10 04:22:20 +02:00

Fixed infinite loop in DoMethodDeclaration

This commit is contained in:
Brian Fiete 2021-05-12 07:15:36 -04:00
parent 7772041ea1
commit 70680fdf39

View file

@ -22767,7 +22767,10 @@ void BfModule::DoMethodDeclaration(BfMethodDeclaration* methodDeclaration, bool
while (checkMethod != NULL) while (checkMethod != NULL)
{ {
if (checkMethod->mMethodDeclaration == NULL) if (checkMethod->mMethodDeclaration == NULL)
{
checkMethod = checkMethod->mNextWithSameName;
continue; continue;
}
if (baseType->mMethodInstanceGroups.size() == 0) if (baseType->mMethodInstanceGroups.size() == 0)
{ {
@ -22776,9 +22779,15 @@ void BfModule::DoMethodDeclaration(BfMethodDeclaration* methodDeclaration, bool
} }
if (checkMethod == methodDef) if (checkMethod == methodDef)
{
checkMethod = checkMethod->mNextWithSameName;
continue; continue;
}
if (checkMethod->mName != methodDef->mName) if (checkMethod->mName != methodDef->mName)
{
checkMethod = checkMethod->mNextWithSameName;
continue; continue;
}
auto checkMethodInstance = GetRawMethodInstanceAtIdx(baseType, checkMethod->mIdx); auto checkMethodInstance = GetRawMethodInstanceAtIdx(baseType, checkMethod->mIdx);
if (checkMethodInstance != NULL) if (checkMethodInstance != NULL)