summaryrefslogtreecommitdiff
path: root/src/fclang.c
diff options
context:
space:
mode:
authorKeith Packard <keithp@keithp.com>2002-08-26 23:34:31 +0000
committerKeith Packard <keithp@keithp.com>2002-08-26 23:34:31 +0000
commit2458a6d8d8bbd9b0b6b999c2aa035816c0d825fa (patch)
treebdd51739ac435f7099301b7cab8e35f7be8b9536 /src/fclang.c
parent5d6788ac7e35b9afb24de4f1e90d43715e50f64f (diff)
FcLangSetHasLang was not actually checking the language set itself
Diffstat (limited to 'src/fclang.c')
-rw-r--r--src/fclang.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/fclang.c b/src/fclang.c
index 1039b4b..9852ea2 100644
--- a/src/fclang.c
+++ b/src/fclang.c
@@ -1,5 +1,5 @@
/*
- * $XFree86: xc/lib/fontconfig/src/fclang.c,v 1.4 2002/07/12 21:06:03 keithp Exp $
+ * $XFree86: xc/lib/fontconfig/src/fclang.c,v 1.6 2002/08/22 18:53:22 keithp Exp $
*
* Copyright © 2002 Keith Packard, member of The XFree86 Project, Inc.
*
@@ -275,9 +275,10 @@ FcLangSetHasLang (const FcLangSet *ls, const FcChar8 *lang)
int i;
id = FcLangSetIndex (lang);
- if (id >= 0)
+ if (id < 0)
+ id = -id - 1;
+ else if (FcLangSetBitGet (ls, id))
return FcLangEqual;
- id = -id - 1;
best = FcLangDifferentLang;
for (i = id - 1; i >= 0; i--)
{