From: Ben Adams Date: Tue, 27 Feb 2018 01:23:56 +0000 (+0000) Subject: Fix ascii range check (#16535) X-Git-Tag: accepted/tizen/unified/20190422.045933~2863 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=47c39edc2fbfbfbddca13ee1a47699ecaaaee204;p=platform%2Fupstream%2Fcoreclr.git Fix ascii range check (#16535) --- diff --git a/src/mscorlib/shared/System/Globalization/CompareInfo.cs b/src/mscorlib/shared/System/Globalization/CompareInfo.cs index 8dbfed1..c369c81 100644 --- a/src/mscorlib/shared/System/Globalization/CompareInfo.cs +++ b/src/mscorlib/shared/System/Globalization/CompareInfo.cs @@ -566,7 +566,7 @@ namespace System.Globalization char* b = bp; // in InvariantMode we support all range and not only the ascii characters. - char maxChar = (char) (GlobalizationMode.Invariant ? 0xFFFF : 0x80); + char maxChar = (char) (GlobalizationMode.Invariant ? 0xFFFF : 0x7F); while (length != 0 && (*a <= maxChar) && (*b <= maxChar)) { diff --git a/src/mscorlib/src/System/String.Comparison.cs b/src/mscorlib/src/System/String.Comparison.cs index 9bd907f..44b3ed9 100644 --- a/src/mscorlib/src/System/String.Comparison.cs +++ b/src/mscorlib/src/System/String.Comparison.cs @@ -65,7 +65,7 @@ namespace System [MethodImplAttribute(MethodImplOptions.InternalCall)] internal static extern int CompareOrdinalHelper(String strA, int indexA, int countA, String strB, int indexB, int countB); - //This will not work in case-insensitive mode for any character greater than 0x80. + //This will not work in case-insensitive mode for any character greater than 0x7F. //We'll throw an ArgumentException. [MethodImplAttribute(MethodImplOptions.InternalCall)] unsafe internal static extern int nativeCompareOrdinalIgnoreCaseWC(String strA, sbyte* strBBytes);