From afac703502942f0dd8ebb6f344525decf53a2e6b Mon Sep 17 00:00:00 2001 From: Brian Fiete Date: Thu, 23 Feb 2023 05:58:30 -0500 Subject: [PATCH] Extra SlotVirtualMethod robustness --- IDEHelper/Compiler/BfModule.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/IDEHelper/Compiler/BfModule.cpp b/IDEHelper/Compiler/BfModule.cpp index 4d171491..bede8ccd 100644 --- a/IDEHelper/Compiler/BfModule.cpp +++ b/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) {