Explorar o código

[3.2] C#: Fix endless reload loop if project has unicode chars

The assembly modified time wasn't picked properly
as the path was treated as latin-1, so the file
watcher was constantly firing the event.
Ignacio Etcheverry %!s(int64=5) %!d(string=hai) anos
pai
achega
e72ee23c43
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      modules/mono/mono_gd/gd_mono_assembly.cpp

+ 1 - 1
modules/mono/mono_gd/gd_mono_assembly.cpp

@@ -109,7 +109,7 @@ void GDMonoAssembly::assembly_load_hook(MonoAssembly *assembly, [[maybe_unused]]
 	GDMonoAssembly *gdassembly = memnew(GDMonoAssembly(name, image, assembly));
 
 #ifdef GD_MONO_HOT_RELOAD
-	const char *path = mono_image_get_filename(image);
+	String path = String::utf8(mono_image_get_filename(image));
 	if (FileAccess::exists(path))
 		gdassembly->modified_time = FileAccess::get_modified_time(path);
 #endif