From 23abfcf2a351aab0c16433d26f854cac2955e889 Mon Sep 17 00:00:00 2001 From: Anairkoen Schno Date: Sat, 8 Dec 2018 19:42:29 -0600 Subject: [PATCH] Updated library loader to show error when duplicates exist. --- IPA.Injector/LibLoader.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/IPA.Injector/LibLoader.cs b/IPA.Injector/LibLoader.cs index d90afeae..0c57f403 100644 --- a/IPA.Injector/LibLoader.cs +++ b/IPA.Injector/LibLoader.cs @@ -23,7 +23,9 @@ namespace IPA.Injector filenameLocations = new Dictionary(); foreach (var fn in TraverseTree(LibraryPath, s => s != NativeLibraryPath)) - filenameLocations.Add(fn.Name, fn.FullName); + if (filenameLocations.ContainsKey(fn.Name)) + Log(Level.Critical, $"Multiple instances of {fn.Name} exist in Libs! Ignoring {fn.FullName}"); + else filenameLocations.Add(fn.Name, fn.FullName); } var testFile = $"{asmName.Name}.{asmName.Version}.dll";