bug 293129, ab-CD extension translations dont work with short locales, r=bsmedberg, sr=shaver, a=asa
git-svn-id: svn://10.0.0.236/trunk@173505 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -214,19 +214,19 @@ LanguagesMatch(const nsACString& a, const nsACString& b)
|
||||
if (*as == '-')
|
||||
return PR_TRUE;
|
||||
|
||||
++as; ++bs;
|
||||
|
||||
// reached the end
|
||||
if (as == ae && bs == be)
|
||||
return PR_TRUE;
|
||||
|
||||
// "a" is short
|
||||
if (as == ae)
|
||||
return (*++bs == '-');
|
||||
return (*bs == '-');
|
||||
|
||||
// "b" is short
|
||||
if (bs == be)
|
||||
return (*++as == '-');
|
||||
|
||||
++as; ++bs;
|
||||
return (*as == '-');
|
||||
}
|
||||
|
||||
return PR_FALSE;
|
||||
|
||||
Reference in New Issue
Block a user