Commit e6cb3cf5 authored by Kenichi Handa's avatar Kenichi Handa

(font_parse_fcname): Fix handling of unknown key.

parent 9d3d42fb
...@@ -1406,6 +1406,8 @@ font_parse_fcname (name, font) ...@@ -1406,6 +1406,8 @@ font_parse_fcname (name, font)
} }
else else
{ {
char *keyhead = p0;
if (memcmp (p0 + 1, "pixelsize=", 10) == 0) if (memcmp (p0 + 1, "pixelsize=", 10) == 0)
prop = FONT_SIZE_INDEX; prop = FONT_SIZE_INDEX;
else else
...@@ -1423,8 +1425,8 @@ font_parse_fcname (name, font) ...@@ -1423,8 +1425,8 @@ font_parse_fcname (name, font)
else if (prop >= 0) else if (prop >= 0)
Ffont_put (font, key, val); Ffont_put (font, key, val);
else else
bcopy (p0 - 1, copy, p1 - p0 + 1); bcopy (keyhead, copy, p1 - keyhead);
copy += p1 - p0 + 1; copy += p1 - keyhead;
} }
} }
p0 = p1; p0 = p1;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment