Skip to content

Commit be842c2

Browse files
authored
Fix TypeRef ID calculation for TypeSpec entry (#89)
***NO_CI***
1 parent bac5b9e commit be842c2

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

source/MetadataProcessor.Core/Mono.Cecil/CodeWriter.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -473,6 +473,8 @@ private ushort GetTypeReferenceId(
473473
if(typeReference is TypeSpecification)
474474
{
475475
referenceId = _context.TypeSpecificationsTable.GetOrCreateTypeSpecificationId(typeReference);
476+
477+
return (ushort)(0x8000 | referenceId);
476478
}
477479
else if (_context.TypeReferencesTable.TryGetTypeReferenceId(typeReference, out referenceId))
478480
{

0 commit comments

Comments
 (0)