diff options
Diffstat (limited to 'modules/mono/mono_gd/gd_mono_assembly.cpp')
-rw-r--r-- | modules/mono/mono_gd/gd_mono_assembly.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/modules/mono/mono_gd/gd_mono_assembly.cpp b/modules/mono/mono_gd/gd_mono_assembly.cpp index f75f18e695..a623b34b68 100644 --- a/modules/mono/mono_gd/gd_mono_assembly.cpp +++ b/modules/mono/mono_gd/gd_mono_assembly.cpp @@ -47,18 +47,17 @@ MonoAssembly *GDMonoAssembly::_search_hook(MonoAssemblyName *aname, void *user_d (void)user_data; // UNUSED String name = mono_assembly_name_get_name(aname); + bool has_extension = name.ends_with(".dll") || name.ends_with(".exe"); if (no_search) return NULL; no_search = true; // Avoid the recursion madness - GDMonoAssembly **loaded_asm = GDMono::get_singleton()->get_loaded_assembly(name.get_basename()); + GDMonoAssembly **loaded_asm = GDMono::get_singleton()->get_loaded_assembly(has_extension ? name.get_basename() : name); if (loaded_asm) return (*loaded_asm)->get_assembly(); - bool has_extension = name.ends_with(".dll") || name.ends_with(".exe"); - String path; MonoAssembly *res = NULL; |