summaryrefslogtreecommitdiff
path: root/pango/fonts.c
diff options
context:
space:
mode:
authorBehdad Esfahbod <behdad@gnome.org>2006-05-22 19:03:26 +0000
committerBehdad Esfahbod <behdad@src.gnome.org>2006-05-22 19:03:26 +0000
commitf9697a634b7267fa0743e47561c28b3ca3ae226b (patch)
treedaed2b3bb55faaf5ae8a0f18584c5fe81c055f7b /pango/fonts.c
parent707be23961a01d36e592f86d0471fa43114e1b36 (diff)
downloadpango-f9697a634b7267fa0743e47561c28b3ca3ae226b.tar.gz
Bug 339730 – Pango needlessly falls back away from a Type 1 font into a
2006-05-22 Behdad Esfahbod <behdad@gnome.org> Bug 339730 – Pango needlessly falls back away from a Type 1 font into a TTF font * pango/fonts.c (find_field): Fix strncmp usage.
Diffstat (limited to 'pango/fonts.c')
-rw-r--r--pango/fonts.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/pango/fonts.c b/pango/fonts.c
index 17f67703..38f459ef 100644
--- a/pango/fonts.c
+++ b/pango/fonts.c
@@ -802,7 +802,8 @@ find_field (const FieldMap *map, int n_elements, const char *str, int len, int *
for (i=0; i<n_elements; i++)
{
- if (map[i].str && g_ascii_strncasecmp (map[i].str, str, len) == 0)
+ if (map[i].str[0] && g_ascii_strncasecmp (map[i].str, str, len) == 0 &&
+ map[i].str[len] == '\0')
{
if (val)
*val = map[i].value;