Fix String.IndexOf with empty string input (#11587)
authorTarek Mahmoud Sayed <tarekms@microsoft.com>
Sat, 13 May 2017 06:35:49 +0000 (23:35 -0700)
committerJan Kotas <jkotas@microsoft.com>
Sat, 13 May 2017 06:35:49 +0000 (23:35 -0700)
src/mscorlib/src/System/Globalization/CompareInfo.Windows.cs

index d20bb9f..143a6bc 100644 (file)
@@ -199,7 +199,7 @@ namespace System.Globalization
             {
                 if (matchLengthPtr != null)
                     *matchLengthPtr = 0;
-                return 0;
+                return startIndex;
             }
 
             if (source.Length == 0)