Skip to content
This repository was archived by the owner on Jan 23, 2023. It is now read-only.

Commit bfc490d

Browse files
benaadamsjkotas
authored andcommitted
Fix ascii range check (dotnet/coreclr#16535)
Signed-off-by: dotnet-bot-corefx-mirror <dotnet-bot@microsoft.com>
1 parent 5c7137c commit bfc490d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Common/src/CoreLib/System/Globalization/CompareInfo.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -566,7 +566,7 @@ internal static unsafe int CompareOrdinalIgnoreCase(ReadOnlySpan<char> strA, Rea
566566
char* b = bp;
567567

568568
// in InvariantMode we support all range and not only the ascii characters.
569-
char maxChar = (char) (GlobalizationMode.Invariant ? 0xFFFF : 0x80);
569+
char maxChar = (char) (GlobalizationMode.Invariant ? 0xFFFF : 0x7F);
570570

571571
while (length != 0 && (*a <= maxChar) && (*b <= maxChar))
572572
{

0 commit comments

Comments
 (0)