Author: marek
Date: 2007-02-25 14:41:15 -0500 (Sun, 25 Feb 2007)
New Revision: 73413
Modified:
trunk/mcs/class/corlib/System.Reflection.Emit/ChangeLog
trunk/mcs/class/corlib/System.Reflection.Emit/MethodBuilder.cs
Log:
2007-02-25 Marek Safar <[EMAIL PROTECTED]>
* MethodBuilder.cs: Empty string is not allowed for DllImport name.
Modified: trunk/mcs/class/corlib/System.Reflection.Emit/ChangeLog
===================================================================
--- trunk/mcs/class/corlib/System.Reflection.Emit/ChangeLog 2007-02-25
17:36:33 UTC (rev 73412)
+++ trunk/mcs/class/corlib/System.Reflection.Emit/ChangeLog 2007-02-25
19:41:15 UTC (rev 73413)
@@ -1,3 +1,7 @@
+2007-02-25 Marek Safar <[EMAIL PROTECTED]>
+
+ * MethodBuilder.cs: Empty string is not allowed for DllImport name.
+
2007-02-13 Marek Safar <[EMAIL PROTECTED]>
* ModuleBuilder.cs: Add GetRegisteredType to expose name_cache for
internal
Modified: trunk/mcs/class/corlib/System.Reflection.Emit/MethodBuilder.cs
===================================================================
--- trunk/mcs/class/corlib/System.Reflection.Emit/MethodBuilder.cs
2007-02-25 17:36:33 UTC (rev 73412)
+++ trunk/mcs/class/corlib/System.Reflection.Emit/MethodBuilder.cs
2007-02-25 19:41:15 UTC (rev 73413)
@@ -341,6 +341,9 @@
*/
pi_dll = (string)attr.ctorArgs [0];
+ if (pi_dll == null || pi_dll.Length == 0)
+ throw new ArgumentException ("DllName
cannot be empty");
+
native_cc =
System.Runtime.InteropServices.CallingConvention.Winapi;
for (int i = 0; i <
attr.namedParamNames.Length; ++i) {
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches