Fix #79872
[mono.git] / mono / metadata / appdomain.c
index 20e4521e7b6df8e4fe084c594a4d8da85277af30..e600fa57a80d36d35739cb345cd36df2f4f1b6e0 100644 (file)
@@ -984,7 +984,7 @@ ves_icall_System_Reflection_Assembly_LoadFrom (MonoString *fname, MonoBoolean re
                MonoException *exc;
 
                if (status == MONO_IMAGE_IMAGE_INVALID)
-                       exc = mono_get_exception_bad_image_format (name);
+                       exc = mono_get_exception_bad_image_format2 (NULL, fname);
                else
                        exc = mono_get_exception_file_not_found2 (NULL, fname);
                g_free (name);