Mon Nov 3 16:39:37 CET 2008 Paolo Molaro <lupus@ximian.com>
authorPaolo Molaro <lupus@oddwiz.org>
Mon, 3 Nov 2008 15:42:21 +0000 (15:42 -0000)
committerPaolo Molaro <lupus@oddwiz.org>
Mon, 3 Nov 2008 15:42:21 +0000 (15:42 -0000)
* Array.cs: in the IList set_Item, ensure the array
element is set using the proper type checks (bug #440819).

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

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

index 1e6eb9f313c20ca358482f477ba25857a3536931..f6d635adf43ff5ef86f42a56b35c937baec4af49 100644 (file)
@@ -181,6 +181,11 @@ namespace System
                        if (unchecked ((uint) index) >= unchecked ((uint) Length))
                                throw new ArgumentOutOfRangeException ("index");
 
+                       object[] oarray = this as object [];
+                       if (oarray != null) {
+                               oarray [index] = (object)item;
+                               return;
+                       }
                        SetGenericValueImpl (index, ref item);
                }
 
index a5b44624277a501523db248173719087d2f38d7a..3497f0539b7e397a7115c959ab591a0fb43a3808 100644 (file)
@@ -1,4 +1,9 @@
 
+Mon Nov 3 16:39:37 CET 2008 Paolo Molaro <lupus@ximian.com>
+
+       * Array.cs: in the IList set_Item, ensure the array
+       element is set using the proper type checks (bug #440819).
+
 Mon Oct 13 16:40:56 CEST 2008 Paolo Molaro <lupus@ximian.com>
 
        * Environment.cs, OperatingSystem.cs: complete support for