summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAkira TAGOH <akira@tagoh.org>2013-05-24 13:55:07 +0900
committerAkira TAGOH <akira@tagoh.org>2013-05-24 13:57:23 +0900
commitcd9b1033a68816a7acfbba1718ba0aa5888f6ec7 (patch)
tree0a3d23838a90860817c208fa948b036c27d573e4
parent8d54091513c00905457e0ee49ba6ea2c4aacddd7 (diff)
Bug 64906 - FcNameParse() should ignore leading whitespace in parameters
After this change, the following works as expected: $ FC_DEBUG=4 fc-match ":family=foo bar, sans-serif" ... FcConfigSubstitute Pattern has 3 elts (size 16) family: "foo bar"(s) "sans-serif"(s) ...
-rw-r--r--src/fcname.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/fcname.c b/src/fcname.c
index 6dd4d49..a525345 100644
--- a/src/fcname.c
+++ b/src/fcname.c
@@ -318,6 +318,12 @@ FcNameFindNext (const FcChar8 *cur, const char *delim, FcChar8 *save, FcChar8 *l
while ((c = *cur))
{
+ if (!isspace (c))
+ break;
+ ++cur;
+ }
+ while ((c = *cur))
+ {
if (c == '\\')
{
++cur;