Bladeren bron

Extra SlotVirtualMethod robustness

Brian Fiete 2 jaren geleden
bovenliggende
commit
afac703502
1 gewijzigde bestanden met toevoegingen van 4 en 1 verwijderingen
  1. 4 1
      IDEHelper/Compiler/BfModule.cpp

+ 4 - 1
IDEHelper/Compiler/BfModule.cpp

@@ -25064,7 +25064,10 @@ bool BfModule::SlotVirtualMethod(BfMethodInstance* methodInstance, BfAmbiguityCo
 					{
 						checkMethodIdx = lookupMethodInstance->mVirtualTableIdx;
 						if (checkMethodIdx >= baseVirtualMethodTable.mSize)
-							FatalError("SlotVirtualMethod OOB in baseVirtualMethodTable[checkMethodIdx]");
+						{
+							Fail("SlotVirtualMethod out of bounds", checkMethodDef->GetRefNode());
+							continue;
+						}
 						auto& baseMethodRef = baseVirtualMethodTable[checkMethodIdx];
 						if (baseMethodRef.mDeclaringMethod.mMethodNum == -1)
 						{