Author: jbevain
Date: 2007-06-18 12:15:48 -0400 (Mon, 18 Jun 2007)
New Revision: 80018

Modified:
   trunk/cecil/lib/ChangeLog
   trunk/cecil/lib/Mono.Cecil/ReflectionReader.cs
Log:
2007-06-18  Jb Evain  <[EMAIL PROTECTED]>

        * Mono.Cecil/ReflectionReader.cs:
                Fix custom mods for fields ref.


Modified: trunk/cecil/lib/ChangeLog
===================================================================
--- trunk/cecil/lib/ChangeLog   2007-06-18 16:13:55 UTC (rev 80017)
+++ trunk/cecil/lib/ChangeLog   2007-06-18 16:15:48 UTC (rev 80018)
@@ -1,3 +1,8 @@
+2007-06-18  Jb Evain  <[EMAIL PROTECTED]>
+
+       * Mono.Cecil/ReflectionReader.cs:
+               Fix custom mods for fields ref.
+
 2007-06-13  Jb Evain  <[EMAIL PROTECTED]>
 
        Integrated patches by:

Modified: trunk/cecil/lib/Mono.Cecil/ReflectionReader.cs
===================================================================
--- trunk/cecil/lib/Mono.Cecil/ReflectionReader.cs      2007-06-18 16:13:55 UTC 
(rev 80017)
+++ trunk/cecil/lib/Mono.Cecil/ReflectionReader.cs      2007-06-18 16:15:48 UTC 
(rev 80018)
@@ -198,10 +198,14 @@
 
                                if (sig is FieldSig) {
                                        FieldSig fs = sig as FieldSig;
+                                       TypeReference fieldType = 
GetTypeRefFromSig (fs.Type, nc);
+                                       if (fs.CustomMods.Length > 0)
+                                               fieldType = GetModifierType 
(fs.CustomMods, fieldType);
+
                                        member = new FieldReference (
                                                m_root.Streams.StringsHeap 
[mrefRow.Name],
                                                declaringType,
-                                               GetTypeRefFromSig (fs.Type, 
nc));
+                                               fieldType);
                                } else {
                                        string name = 
m_root.Streams.StringsHeap [mrefRow.Name];
                                        MethodSig ms = (MethodSig) sig;

_______________________________________________
Mono-patches maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches

Reply via email to