Quellcode durchsuchen

Fix preloader crash on Unity 2019 if game path has non-ASCII chars

ghorsington vor 4 Jahren
Ursprung
Commit
61a1b07167
1 geänderte Dateien mit 1 neuen und 1 gelöschten Zeilen
  1. 1 1
      BepInEx.Preloader/Patching/AssemblyPatcher.cs

+ 1 - 1
BepInEx.Preloader/Patching/AssemblyPatcher.cs

@@ -231,7 +231,7 @@ namespace BepInEx.Preloader.Patching
 
 						foreach (var resolvedAss in AppDomain.CurrentDomain.GetAssemblies())
 						{
-							var name = resolvedAss.GetName().Name;
+							var name = new AssemblyName(resolvedAss.FullName).Name;
 							// Report only the first type that caused the assembly to load, because any subsequent ones can be false positives
 							if (!resolvedAssemblies.ContainsKey(name))
 								resolvedAssemblies[name] = assemblyPatcher.TypeName;