]> git.wh0rd.org - fontconfig.git/commitdiff
Bug 28958 - lang=en matches other langs
authorBehdad Esfahbod <behdad@behdad.org>
Tue, 7 Dec 2010 23:48:56 +0000 (18:48 -0500)
committerBehdad Esfahbod <behdad@behdad.org>
Tue, 7 Dec 2010 23:48:56 +0000 (18:48 -0500)
Patch from Akira TAGOH.

src/fclang.c

index f3b825a88888adba1980585cf4c0691060a61eaf..1c78328048bb385003ffc43d24e00699a6eb356b 100644 (file)
@@ -505,6 +505,7 @@ FcLangSetCompare (const FcLangSet *lsa, const FcLangSet *lsb)
 
 /*
  * Used in computing values -- mustn't allocate any storage
+ * XXX Not thread-safe
  */
 FcLangSet *
 FcLangSetPromote (const FcChar8 *lang)
@@ -515,6 +516,7 @@ FcLangSetPromote (const FcChar8 *lang)
     int                        id;
 
     memset (ls.map, '\0', sizeof (ls.map));
+    ls.map_size = NUM_LANG_SET_MAP;
     ls.extra = 0;
     id = FcLangSetIndex (lang);
     if (id > 0)