diff options
author | Behdad Esfahbod <behdad@gnome.org> | 2008-10-23 18:24:48 +0000 |
---|---|---|
committer | Behdad Esfahbod <behdad@src.gnome.org> | 2008-10-23 18:24:48 +0000 |
commit | c59be12d06638a02140b0e409d3939b2db5a5b14 (patch) | |
tree | 0a995845c4835d6f7ac0713a5cae8c64d52f6e3d /pango/fonts.c | |
parent | 9ce5d341410aae12b498e11f49e8357da835f0bc (diff) | |
download | pango-c59be12d06638a02140b0e409d3939b2db5a5b14.tar.gz |
Bug 557620 – pango_font_description_from_string not correct
2008-10-23 Behdad Esfahbod <behdad@gnome.org>
Bug 557620 – pango_font_description_from_string not correct
* pango/fonts.c (find_field_any): Fix parsing of "normal" when
not at the end of string.
svn path=/trunk/; revision=2732
Diffstat (limited to 'pango/fonts.c')
-rw-r--r-- | pango/fonts.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/pango/fonts.c b/pango/fonts.c index 066c54ce..af71a5e6 100644 --- a/pango/fonts.c +++ b/pango/fonts.c @@ -933,9 +933,7 @@ find_field (const FieldMap *map, int n_elements, const char *str, int len, int * static gboolean find_field_any (const char *str, int len, PangoFontDescription *desc) { - gboolean found = FALSE; - - if (g_ascii_strcasecmp (str, "Normal") == 0) + if (field_matches ("Normal", str, len)) return TRUE; #define FIELD(NAME, MASK) \ @@ -943,9 +941,9 @@ find_field_any (const char *str, int len, PangoFontDescription *desc) if (find_field (NAME##_map, G_N_ELEMENTS (NAME##_map), str, len, \ desc ? (int *)&desc->NAME : NULL)) \ { \ - found = TRUE; \ if (desc) \ desc->mask |= MASK; \ + return TRUE; \ } \ } G_STMT_END @@ -957,7 +955,7 @@ find_field_any (const char *str, int len, PangoFontDescription *desc) #undef FIELD - return found; + return FALSE; } static const char * |