mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1068218: Don't pass lone surrogates to GetDirectionFromChar, r=ehsan
This commit is contained in:
parent
ec1e4bc2cd
commit
7462d278ae
@ -320,12 +320,15 @@ GetDirectionFromText(const char16_t* aText, const uint32_t aLength,
|
||||
current++;
|
||||
}
|
||||
|
||||
Directionality dir = GetDirectionFromChar(ch);
|
||||
if (dir != eDir_NotSet) {
|
||||
if (aFirstStrong) {
|
||||
*aFirstStrong = current;
|
||||
// Just ignore lone surrogates
|
||||
if (!IS_SURROGATE(ch)) {
|
||||
Directionality dir = GetDirectionFromChar(ch);
|
||||
if (dir != eDir_NotSet) {
|
||||
if (aFirstStrong) {
|
||||
*aFirstStrong = current;
|
||||
}
|
||||
return dir;
|
||||
}
|
||||
return dir;
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user