浏览代码

Extra SlotVirtualMethod robustness

Brian Fiete 2 年之前
父节点
当前提交
afac703502
共有 1 个文件被更改,包括 4 次插入1 次删除
  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)
 						{