Fix erroneous test on language id in FcLangSetPromote()

FcLangSetIndex() indicates "not found" with a non-negative return value.
Return value 0 doesn't imply "not found", it rather means "language
found at index 0 in fcLangCharSets".
This commit is contained in:
Florent Rougon 2017-06-07 01:34:51 +02:00 committed by Akira TAGOH
parent 4970c7e810
commit 209619b1a6
1 changed files with 1 additions and 1 deletions

View File

@ -732,7 +732,7 @@ FcLangSetPromote (const FcChar8 *lang, FcValuePromotionBuffer *vbuf)
if (lang)
{
id = FcLangSetIndex (lang);
if (id > 0)
if (id >= 0)
{
FcLangSetBitSet (&buf->ls, id);
}