Skip to content

Commit

Permalink
ICU-22707 Fix an ancient bug in moveIndex32
Browse files Browse the repository at this point in the history
  • Loading branch information
eggrobin authored and markusicu committed Jul 18, 2024
1 parent b3ec8d1 commit d149089
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2093,8 +2093,8 @@ static int moveIndex32(StringBuffer s, int pos, int amt) {
}
pos--;
c = s.charAt(pos);
if (UTF16.isTrailSurrogate(c) && pos >= 0) {
c = s.charAt(pos);
if (UTF16.isTrailSurrogate(c) && pos > 0) {
c = s.charAt(pos - 1);
if (UTF16.isLeadSurrogate(c)) {
pos--;
}
Expand Down

0 comments on commit d149089

Please sign in to comment.