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:
axel%pike.org
2005-05-17 09:24:16 +00:00
parent 79fb88819e
commit 9edef9e18b

View File

@@ -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;