Workaround for broken compiler(s) that add terminating NUL to type names in custom attribute data.

This commit is contained in:
jfrijters 2010-04-18 09:23:52 +00:00
Родитель 9ef69e669c
Коммит 1b42a3946a
1 изменённых файлов: 5 добавлений и 0 удалений

Просмотреть файл

@ -292,6 +292,11 @@ namespace IKVM.Reflection
{
return null;
}
if (typeName.Length > 0 && typeName[typeName.Length - 1] == 0)
{
// there are broken compilers that emit an extra NUL character after the type name
typeName = typeName.Substring(0, typeName.Length - 1);
}
return asm.universe.GetType(asm, typeName, true);
}