зеркало из https://github.com/mono/ikvm-fork.git
Workaround for broken compiler(s) that add terminating NUL to type names in custom attribute data.
This commit is contained in:
Родитель
9ef69e669c
Коммит
1b42a3946a
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче