mirror of
https://github.com/BepInEx/BepInEx.git
synced 2026-10-20 01:46:13 +00:00
Fix assembly resolving on locales in paths with non-ASCII chars
This commit is contained in:
1 parent
1a574b3e58
commit
d81aca7795
1 file changed
+3
-1
@@ -21,8 +21,10 @@ namespace BepInEx.Preloader
|
||||
{
|
||||
var assemblyName = new AssemblyName(args.Name);
|
||||
|
||||
// Use parse assembly name on managed side because native GetName() can fail on some locales
|
||||
// if the game path has "exotic" characters
|
||||
var foundAssembly = AppDomain.CurrentDomain.GetAssemblies()
|
||||
.FirstOrDefault(x => x.GetName().Name == assemblyName.Name);
|
||||
.FirstOrDefault(x => new AssemblyName(x.FullName).Name == assemblyName.Name);
|
||||
|
||||
if (foundAssembly != null)
|
||||
return foundAssembly;
|
||||
|
||||
Reference in new issue
Block a user