1
0
Fork 0
mirror of https://github.com/beefytech/Beef.git synced 2025-06-08 11:38:21 +02:00

Fixed named param autocomplete crash

This commit is contained in:
Brian Fiete 2022-09-05 09:40:49 -07:00
parent 03c56b42c9
commit 5490af4690

View file

@ -8180,6 +8180,8 @@ void BfCompiler::GenerateAutocompleteInfo()
auto& bestInstance = methodMatchInfo->mInstanceList[methodMatchInfo->mBestIdx]; auto& bestInstance = methodMatchInfo->mInstanceList[methodMatchInfo->mBestIdx];
auto bestMethodDef = bestInstance.mMethodDef; auto bestMethodDef = bestInstance.mMethodDef;
if (bestMethodDef != NULL)
{
for (int paramIdx = 0; paramIdx < bestMethodDef->mParams.mSize; paramIdx++) for (int paramIdx = 0; paramIdx < bestMethodDef->mParams.mSize; paramIdx++)
{ {
if ((paramIdx == 0) && (bestMethodDef->mMethodType == BfMethodType_Extension)) if ((paramIdx == 0) && (bestMethodDef->mMethodType == BfMethodType_Extension))
@ -8187,6 +8189,7 @@ void BfCompiler::GenerateAutocompleteInfo()
autoComplete->AddEntry(AutoCompleteEntry("param", bestMethodDef->mParams[paramIdx]->mName + ":"), filter); autoComplete->AddEntry(AutoCompleteEntry("param", bestMethodDef->mParams[paramIdx]->mName + ":"), filter);
} }
} }
}
String invokeInfoText; String invokeInfoText;
invokeInfoText += StrFormat("%d", methodMatchInfo->mBestIdx); invokeInfoText += StrFormat("%d", methodMatchInfo->mBestIdx);