]> git.wh0rd.org Git - fontconfig.git/commitdiff
[fc-lang] Fix bug in country map generation
authorBehdad Esfahbod <behdad@behdad.org>
Wed, 18 Mar 2009 22:43:09 +0000 (18:43 -0400)
committerBehdad Esfahbod <behdad@behdad.org>
Wed, 24 Jun 2009 17:52:09 +0000 (13:52 -0400)
Previously the county map code was using an uninitialized variable and
hence was totally failing to populate same-lang-different-territory map.

fc-lang/fc-lang.c

index 22afe904062cada1e5a4cee2790866188f2042ec..b0f1690e880533fc1823989148f2e9d3a0b1e500 100644 (file)
@@ -488,7 +488,7 @@ main (int argc, char **argv)
                for (d = c + 1; d < ncountry; d++)
                {
                    int j = country[d];
-                   if (j >= 0 && !strncmp (langs[j], langs[i], l))
+                   if (j >= 0 && !strncmp (langs[j], langs[i], lang + 1))
                    {
                        BitSet(map, j);
                        country[d] = -1;