Fix Span LastIndexOf empty value handling
authorViktor Hofer <viktor.hofer@microsoft.com>
Sun, 8 Jul 2018 13:41:26 +0000 (15:41 +0200)
committerGitHub <noreply@github.com>
Sun, 8 Jul 2018 13:41:26 +0000 (15:41 +0200)
src/System.Private.CoreLib/shared/System/MemoryExtensions.Fast.cs

index a53ed19..58d0b5c 100644 (file)
@@ -188,7 +188,7 @@ namespace System
 
             if (value.Length == 0)
             {
-                return 0;
+                return span.Length - 1;
             }
 
             if (span.Length == 0)