From a40faeb5d29200504cfe1b9426714006a779492a Mon Sep 17 00:00:00 2001 From: ds5678 <49847914+ds5678@users.noreply.github.com> Date: Mon, 17 Jun 2024 23:17:29 -0700 Subject: [PATCH] Handle short assembly names --- Cpp2IL.Core/Model/Contexts/ApplicationAnalysisContext.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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];