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:
parent
4970c7e810
commit
209619b1a6
|
@ -732,7 +732,7 @@ FcLangSetPromote (const FcChar8 *lang, FcValuePromotionBuffer *vbuf)
|
||||||
if (lang)
|
if (lang)
|
||||||
{
|
{
|
||||||
id = FcLangSetIndex (lang);
|
id = FcLangSetIndex (lang);
|
||||||
if (id > 0)
|
if (id >= 0)
|
||||||
{
|
{
|
||||||
FcLangSetBitSet (&buf->ls, id);
|
FcLangSetBitSet (&buf->ls, id);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue