From 84d50b7123ab74cf7168ffb6c2b1ee1146bb344c Mon Sep 17 00:00:00 2001 From: Chong Yidong Date: Tue, 17 Jun 2008 05:33:06 +0000 Subject: [PATCH] (font_parse_fcname): Store divider characters for unknown-spec list. --- src/font.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/font.c b/src/font.c index 51b7c2ec220..962e8a308f2 100644 --- a/src/font.c +++ b/src/font.c @@ -1409,7 +1409,7 @@ font_parse_fcname (name, font) the key QCfc_unknown_spec. */ char *copy_start, *copy; - copy_start = copy = alloca (name + len - props_beg); + copy_start = copy = alloca (name + len - props_beg + 2); if (! copy) return -1; @@ -1450,6 +1450,7 @@ font_parse_fcname (name, font) else { /* Unknown key */ + *copy++ = ':'; bcopy (p, copy, word_len); copy += word_len; } @@ -1482,8 +1483,7 @@ font_parse_fcname (name, font) Ffont_put (font, key, val); else { - if (copy_start != copy) - *copy++ = ':'; + *copy++ = ':'; bcopy (keyhead, copy, q - keyhead); copy += q - keyhead; }