浏览代码

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

ghorsington 4 年之前
父节点
当前提交
61a1b07167
共有 1 个文件被更改,包括 1 次插入1 次删除
  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;