提交 f381e320 编写于 作者: B Behdad Esfahbod

Fix lang matching logic

Previous code was broken logically, but harmless.
上级 ee5350d6
......@@ -845,7 +845,7 @@ hb_ot_tag_from_language (hb_language_t language)
{
const LangTagLong *lang_tag;
lang_tag = &ot_languages_zh[i];
if (lang_matches (lang_tag->language, lang_str))
if (lang_matches (lang_str, lang_tag->language))
return lang_tag->tag;
}
......
......@@ -195,6 +195,7 @@ test_ot_tag_language (void)
test_language_two_way ("ZHH", "zh-hk"); /* Chinese (Hong Kong) */
test_tag_from_language ("ZHS", "zh"); /* Chinese */
test_tag_from_language ("ZHS", "zh-cn"); /* Chinese (China) */
test_tag_from_language ("ZHS", "zh-sg"); /* Chinese (Singapore) */
test_tag_from_language ("ZHT", "zh-mo"); /* Chinese (Macao) */
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册