Skip to content

Commit

Permalink
BUG: ICU4N.Impl.Utility::ParseInteger(): Fixed logic to ignore case w…
Browse files Browse the repository at this point in the history
…hen searching for the prefix "0x"
  • Loading branch information
NightOwl888 committed Nov 23, 2023
1 parent 0aa1f4c commit f1304d4
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/ICU4N/Impl/Utility.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1524,7 +1524,8 @@ public static int ParseInteger(string rule, int[] pos, int limit) // ICU4N TODO:
int p = pos[0];
int radix = 10;

if (rule.RegionMatches(/*true,*/ p, "0x", 0, 2, StringComparison.Ordinal))
//if (rule.RegionMatches(/*true,*/ p, "0x", 0, 2, StringComparison.OrdinalIgnoreCase))
if (rule.Length >= p + 1 && rule[p] == '0' && (rule[p + 1] == 'x' || rule[p + 1] == 'X'))
{
p += 2;
radix = 16;
Expand Down

0 comments on commit f1304d4

Please sign in to comment.