[Fontconfig] fontconfig: Branch 'master'

Akira TAGOH tagoh at kemper.freedesktop.org
Fri Jun 9 06:52:32 UTC 2017


 src/fclang.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 209619b1a63f415320c8d379efc0525273c7b575
Author: Florent Rougon <f.rougon at free.fr>
Date:   Wed Jun 7 01:34:51 2017 +0200

    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".

diff --git a/src/fclang.c b/src/fclang.c
index 19f3ddd..dbbe721 100644
--- a/src/fclang.c
+++ b/src/fclang.c
@@ -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);
 	}


More information about the Fontconfig mailing list