From b618b42d004b0b9bb345db00de0e93c826b6b6d5 Mon Sep 17 00:00:00 2001 From: jfrijters Date: Thu, 24 Jun 2010 07:28:56 +0000 Subject: [PATCH] Copy/paste bug in ReadTypeDefOrRefEncoded(). Note that this is a low impact bug, because ironically in most places where TypeDefOrRefEncoded is used a TypeSpec isn't legal, only in custom modifiers (where it isn't specified in the spec) is it allowed to use a TypeDefOrRefEncoded token that refers to a TypeSpec. --- reflect/Signature.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/reflect/Signature.cs b/reflect/Signature.cs index 7727aced..0a1bf39e 100644 --- a/reflect/Signature.cs +++ b/reflect/Signature.cs @@ -569,7 +569,7 @@ namespace IKVM.Reflection case 1: return module.ResolveType((TypeRefTable.Index << 24) + (encoded >> 2), null, null); case 2: - return module.ResolveType((TypeRefTable.Index << 24) + (encoded >> 2), context); + return module.ResolveType((TypeSpecTable.Index << 24) + (encoded >> 2), context); default: throw new BadImageFormatException(); }