mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-27 21:00:50 +00:00
bug 736227 - fix surrogate handling in case-insensitive string compare. r=smontagu
This commit is contained in:
parent
5b1c387da0
commit
b16d28f2aa
@ -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…
x
Reference in New Issue
Block a user