diff options
author | jbevain <jbevain@gmail.com> | 2011-02-22 17:05:28 +0300 |
---|---|---|
committer | jbevain <jbevain@gmail.com> | 2011-02-22 17:05:28 +0300 |
commit | 5f1b504f2de2c67aea0273823da1e0b68bbbe0f1 (patch) | |
tree | 7fc0d6dd271a16a5605477513593644e3d10762f /Mono.Cecil | |
parent | 650d1f49431fbd390f469e1a91e6d451689b7bb2 (diff) |
Properly read full pkey for references
Diffstat (limited to 'Mono.Cecil')
-rw-r--r-- | Mono.Cecil/AssemblyReader.cs | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/Mono.Cecil/AssemblyReader.cs b/Mono.Cecil/AssemblyReader.cs index c864af8..300c110 100644 --- a/Mono.Cecil/AssemblyReader.cs +++ b/Mono.Cecil/AssemblyReader.cs @@ -501,7 +501,12 @@ namespace Mono.Cecil { PopulateVersionAndFlags (reference); - reference.PublicKeyToken = ReadBlob (); + var key_or_token = ReadBlob (); + + if (reference.HasPublicKey) + reference.PublicKey = key_or_token; + else + reference.PublicKeyToken = key_or_token; PopulateNameAndCulture (reference); |