* regex.cs: In Split(), if the last match is at the end of the string,
authorLluis Sanchez <lluis@novell.com>
Wed, 7 Jan 2004 18:23:37 +0000 (18:23 -0000)
committerLluis Sanchez <lluis@novell.com>
Wed, 7 Jan 2004 18:23:37 +0000 (18:23 -0000)
an empty string must be added to the array of results.

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

mcs/class/System/System.Text.RegularExpressions/ChangeLog
mcs/class/System/System.Text.RegularExpressions/regex.cs

index b0ac318e0067352f24da519a61d4b5881a456e5f..944279666d202d6651df94b613545cd66536212b 100644 (file)
@@ -1,3 +1,8 @@
+2004-01-07  Lluis Sanchez Gual <lluis@ximian.com>
+
+       * regex.cs: In Split(), if the last match is at the end of the string, 
+       an empty string must be added to the array of results.
+
 2003-12-15  Sanjay Gupta <gsanjay@novell.com>
        * match.cs: Check for null value before Substring method call.  
        Fixes bug #52034.
index bca4fab53f9d8c045f37d32f796352b10d5948c2..b972bea35a8b09a2388b8b42662e56b9b5470d0e 100644 (file)
@@ -337,7 +337,7 @@ namespace System.Text.RegularExpressions {
                                ptr = m.Index + m.Length;\r
                        }\r
 \r
-                       if (ptr < input.Length) {\r
+                       if (ptr <= input.Length) {\r
                                splits.Add (input.Substring (ptr));\r
                        }\r
 \r