diff options
author | Florent Rougon <f.rougon@free.fr> | 2017-06-07 01:34:51 +0200 |
---|---|---|
committer | Akira TAGOH <akira@tagoh.org> | 2017-06-09 15:52:23 +0900 |
commit | 209619b1a63f415320c8d379efc0525273c7b575 (patch) | |
tree | 524f2b75e176dfa4adb2d6ade609fe0bc57b66c6 /src | |
parent | 4970c7e810fec29b5ad40a595850288f14f48e37 (diff) |
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".
Diffstat (limited to 'src')
-rw-r--r-- | src/fclang.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/fclang.c b/src/fclang.c index 19f3ddd4..dbbe7216 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); } |