Author: zoltan
Date: 2005-03-10 17:55:01 -0500 (Thu, 10 Mar 2005)
New Revision: 41668

Modified:
   trunk/mcs/class/corlib/System/Array.cs
   trunk/mcs/class/corlib/System/ChangeLog
Log:
2005-03-11  Zoltan Varga  <[EMAIL PROTECTED]>

        * Array.cs (Sort): Bail out early if length <= 1. Fixes #72721.


Modified: trunk/mcs/class/corlib/System/Array.cs
===================================================================
--- trunk/mcs/class/corlib/System/Array.cs      2005-03-10 22:21:47 UTC (rev 
41667)
+++ trunk/mcs/class/corlib/System/Array.cs      2005-03-10 22:55:01 UTC (rev 
41668)
@@ -1093,6 +1093,9 @@
                                || (items != null && index > items.Length - 
length))
                                throw new ArgumentException ();
 
+                       if (length <= 1)
+                               return;
+
                        if (comparer == null) {
                                Swapper iswapper;
                                if (items == null)

Modified: trunk/mcs/class/corlib/System/ChangeLog
===================================================================
--- trunk/mcs/class/corlib/System/ChangeLog     2005-03-10 22:21:47 UTC (rev 
41667)
+++ trunk/mcs/class/corlib/System/ChangeLog     2005-03-10 22:55:01 UTC (rev 
41668)
@@ -1,3 +1,7 @@
+2005-03-11  Zoltan Varga  <[EMAIL PROTECTED]>
+
+       * Array.cs (Sort): Bail out early if length <= 1. Fixes #72721.
+
 2005-03-10  Zoltan Varga  <[EMAIL PROTECTED]>
 
        * Environment.cs: Bump corlib version.

_______________________________________________
Mono-patches maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches

Reply via email to