Permalink
Browse files

2009-06-14 Zoltan Varga <vargaz@gmail.com>

	* class.c (mono_class_from_name): Fix support for assembly references
	in the EXPORTEDTYPE table. Fixes #511704.

svn path=/trunk/mono/; revision=136078
  • Loading branch information...
1 parent 1e09edf commit 5e7b2478a9f91f00202bf9f570886638892cb478 @vargaz vargaz committed Jun 14, 2009
Showing with 9 additions and 7 deletions.
  1. +5 −0 mono/metadata/ChangeLog
  2. +4 −7 mono/metadata/class.c
View
5 mono/metadata/ChangeLog
@@ -1,3 +1,8 @@
+2009-06-14 Zoltan Varga <vargaz@gmail.com>
+
+ * class.c (mono_class_from_name): Fix support for assembly references
+ in the EXPORTEDTYPE table. Fixes #511704.
+
2009-06-13 Geoff Norton <gnorton@novell.com>
* domain.c: Ensure that mono_domain_assembly_open actually opens the
View
11 mono/metadata/class.c
@@ -5870,20 +5870,17 @@ mono_class_from_name (MonoImage *image, const char* name_space, const char *name
return return_nested_in (class, nested);
return class;
} else if ((impl & MONO_IMPLEMENTATION_MASK) == MONO_IMPLEMENTATION_ASSEMBLYREF) {
- MonoAssembly **references = image->references;
guint32 assembly_idx;
assembly_idx = impl >> MONO_IMPLEMENTATION_BITS;
- if (!references [assembly_idx - 1])
- mono_assembly_load_reference (image, assembly_idx - 1);
- g_assert (references == image->references);
- g_assert (references [assembly_idx - 1]);
- if (references [assembly_idx - 1] == (gpointer)-1)
+ mono_assembly_load_reference (image, assembly_idx - 1);
+ g_assert (image->references [assembly_idx - 1]);
+ if (image->references [assembly_idx - 1] == (gpointer)-1)
return NULL;
else
/* FIXME: Cycle detection */
- return mono_class_from_name (references [assembly_idx - 1]->image, name_space, name);
+ return mono_class_from_name (image->references [assembly_idx - 1]->image, name_space, name);
} else {
g_error ("not yet implemented");
}

0 comments on commit 5e7b247

Please sign in to comment.