# HG changeset patch # User Chong Yidong # Date 1213680786 0 # Node ID 2a8c4f357ec426aaf8c984a2538694d0bcfe9d36 # Parent 7392fa72fdd0e7662f0589cd69fc8c37dd79b589 (font_parse_fcname): Store divider characters for unknown-spec list. diff -r 7392fa72fdd0 -r 2a8c4f357ec4 src/font.c --- a/src/font.c Tue Jun 17 05:32:19 2008 +0000 +++ b/src/font.c Tue Jun 17 05:33:06 2008 +0000 @@ -1409,7 +1409,7 @@ 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 @@ else { /* Unknown key */ + *copy++ = ':'; bcopy (p, copy, word_len); copy += word_len; } @@ -1482,8 +1483,7 @@ Ffont_put (font, key, val); else { - if (copy_start != copy) - *copy++ = ':'; + *copy++ = ':'; bcopy (keyhead, copy, q - keyhead); copy += q - keyhead; }