Skip to content

Commit

Permalink
Removing the assumption that StringHeap is always present in the meta…
Browse files Browse the repository at this point in the history
…data when computing table information (jbevain#665)
  • Loading branch information
ivan committed May 14, 2020
1 parent b2958c0 commit 6d7e4a5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Mono.Cecil.PE/ImageReader.cs
Original file line number Diff line number Diff line change
Expand Up @@ -481,7 +481,7 @@ void ComputeTableInformations ()
{
uint offset = (uint) BaseStream.Position - table_heap_offset - image.MetadataSection.PointerToRawData; // header

int stridx_size = image.StringHeap.IndexSize;
int stridx_size = image.StringHeap != null ? image.StringHeap.IndexSize : 2;
int guididx_size = image.GuidHeap != null ? image.GuidHeap.IndexSize : 2;
int blobidx_size = image.BlobHeap != null ? image.BlobHeap.IndexSize : 2;

Expand Down

0 comments on commit 6d7e4a5

Please sign in to comment.