diff --git a/Cpp2IL.Core/Model/Contexts/ApplicationAnalysisContext.cs b/Cpp2IL.Core/Model/Contexts/ApplicationAnalysisContext.cs index 9a9d034e..74cad761 100644 --- a/Cpp2IL.Core/Model/Contexts/ApplicationAnalysisContext.cs +++ b/Cpp2IL.Core/Model/Contexts/ApplicationAnalysisContext.cs @@ -150,7 +150,7 @@ private void PopulateMethodsByAddressTable() /// An assembly analysis context if one can be found which matches the given name, else null. public AssemblyAnalysisContext? GetAssemblyByName(string name) { - if (name[^4] == '.' && name[^3] == 'd') + if (name.Length >= 4 && name[^4] == '.' && name[^3] == 'd') //Trim .dll extension name = name[..^4];