Author: ankit
Date: 2006-07-20 09:43:18 -0400 (Thu, 20 Jul 2006)
New Revision: 62818
Modified:
trunk/mcs/class/PEAPI/ChangeLog
trunk/mcs/class/PEAPI/Metadata.cs
Log:
2006-07-20 Ankit Jain <[EMAIL PROTECTED]>
* Metadata.cs (CustomAttribute.BuildTables): Value can be null.
Modified: trunk/mcs/class/PEAPI/ChangeLog
===================================================================
--- trunk/mcs/class/PEAPI/ChangeLog 2006-07-20 13:27:32 UTC (rev 62817)
+++ trunk/mcs/class/PEAPI/ChangeLog 2006-07-20 13:43:18 UTC (rev 62818)
@@ -1,3 +1,7 @@
+2006-07-20 Ankit Jain <[EMAIL PROTECTED]>
+
+ * Metadata.cs (CustomAttribute.BuildTables): Value can be null.
+
2006-06-07 Ankit Jain <[EMAIL PROTECTED]>
* PEAPI.cs (PEFile.GetNextSectStart): Handle the case when (tide %
Modified: trunk/mcs/class/PEAPI/Metadata.cs
===================================================================
--- trunk/mcs/class/PEAPI/Metadata.cs 2006-07-20 13:27:32 UTC (rev 62817)
+++ trunk/mcs/class/PEAPI/Metadata.cs 2006-07-20 13:43:18 UTC (rev 62818)
@@ -471,9 +471,14 @@
internal sealed override void BuildTables(MetaData md)
{
+ md.AddToTable(MDTable.CustomAttribute, this);
+ if (byteVal == null) {
+ valIx = 0;
+ return;
+ }
+
BinaryWriter bw = new BinaryWriter(new MemoryStream());
bw.Write(byteVal);
- md.AddToTable(MDTable.CustomAttribute, this);
MemoryStream str = (MemoryStream)bw.BaseStream;
valIx = md.AddToBlobHeap(str.ToArray());
}
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches