mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
bug 736227 - fix surrogate handling in case-insensitive string compare. r=smontagu
This commit is contained in:
parent
c68fb1a346
commit
d73cbd10ed
@ -276,7 +276,7 @@ CaseInsensitiveCompare(const PRUnichar *a,
|
||||
if (NS_IS_HIGH_SURROGATE(c1) && len > 1 && NS_IS_LOW_SURROGATE(*a)) {
|
||||
c1 = SURROGATE_TO_UCS4(c1, *a++);
|
||||
if (NS_IS_HIGH_SURROGATE(c2) && NS_IS_LOW_SURROGATE(*b)) {
|
||||
c2 = SURROGATE_TO_UCS4(c1, *b++);
|
||||
c2 = SURROGATE_TO_UCS4(c2, *b++);
|
||||
}
|
||||
// If c2 wasn't a surrogate, decrementing len means we'd stop
|
||||
// short of the end of string b, but that doesn't actually matter
|
||||
|
Loading…
Reference in New Issue
Block a user