ICU-22707 Fix an ancient bug in moveIndex32

This commit is contained in:
Robin Leroy 2024-07-18 15:48:57 +02:00 committed by Markus Scherer
parent b3ec8d1abd
commit d1490896ed

View file

@ -2093,8 +2093,8 @@ public class RBBITestMonkey extends CoreTestFmwk {
}
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--;
}