[PEAPI] Fixes custom attributes with byte array constant
authorMarek Safar <marek.safar@gmail.com>
Fri, 29 May 2015 15:41:12 +0000 (17:41 +0200)
committerMarek Safar <marek.safar@gmail.com>
Fri, 29 May 2015 15:42:14 +0000 (17:42 +0200)
mcs/class/PEAPI/Metadata.cs

index 1e08ff38590bddf4950a8e3c9b03d0d8f2586051..041b3392ef44afefcbba4efd9fcb8951bf9e7410 100644 (file)
@@ -443,6 +443,10 @@ namespace PEAPI {
                        type = constrType;
                        cVal = val;
                        tabIx = MDTable.CustomAttribute;
+
+                       var bac = val as ByteArrConst;
+                       if (bac != null)
+                               byteVal = bac.val;
                }
 
                internal CustomAttribute(MetaDataElement paren, Method constrType,
@@ -2945,7 +2949,7 @@ namespace PEAPI {
        }
 
        public class ByteArrConst : DataConstant {
-               byte[] val;
+               internal byte[] val;
 
                public ByteArrConst(byte[] val) 
                {