* MonoCustomAttrs.cs: fixed issue where an empty array was
authorGert Driesen <drieseng@users.sourceforge.net>
Sun, 6 Jun 2004 17:52:35 +0000 (17:52 -0000)
committerGert Driesen <drieseng@users.sourceforge.net>
Sun, 6 Jun 2004 17:52:35 +0000 (17:52 -0000)
returned when GetCustomAttributes was invoked with null
attribute type and there was only one result

svn path=/trunk/mcs/; revision=28916

mcs/class/corlib/System/ChangeLog
mcs/class/corlib/System/MonoCustomAttrs.cs

index 3270620a6d47374936ac595792c4977363db4c1e..c45f9fe6e56100704b4c58be8fc218b55d5c24ba 100644 (file)
@@ -1,3 +1,9 @@
+2004-06-06  Gert Driesen <drieseng@users.sourceforge.net>
+
+       * MonoCustomAttrs.cs: fixed issue where an empty array was 
+       returned when GetCustomAttributes was invoked with null
+       attribute type and there was only one result
+
 2004-06-06  Sebastien Pouliot  <sebastien@ximian.com>
 
        * Decimal.cs: Fixed ToString(String.Empty) to default ("G").
index 3565a3f3efd67fd164e2501fd846b10f0780ee29..096e7178f48f17350b5a6ac9e60c54631f6cd701 100755 (executable)
@@ -63,8 +63,8 @@ namespace System
                                }
                                else
                                {
-                                       r = (object[]) Array.CreateInstance (res[0].GetType (), 0);
-
+                                       r = (object[]) Array.CreateInstance (res[0].GetType (), 1);\r
+                                       r[0] = res[0];\r
                                }
                                return r;
                        }