changeset 95516:cb48088b99e1

(font_parse_fcname): Fix handling of unknown key.
author Kenichi Handa <handa@m17n.org>
date Tue, 03 Jun 2008 11:50:33 +0000
parents 328f63bafded
children ddb280223101
files src/font.c
diffstat 1 files changed, 4 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/font.c	Tue Jun 03 11:05:52 2008 +0000
+++ b/src/font.c	Tue Jun 03 11:50:33 2008 +0000
@@ -1406,6 +1406,8 @@
 	}
       else
 	{
+	  char *keyhead = p0;
+
 	  if (memcmp (p0 + 1, "pixelsize=", 10) == 0)
 	    prop = FONT_SIZE_INDEX;
 	  else
@@ -1423,8 +1425,8 @@
 	      else if (prop >= 0)
 		Ffont_put (font, key, val);
 	      else
-		bcopy (p0 - 1, copy, p1 - p0 + 1);
-	      copy += p1 - p0 + 1;
+		bcopy (keyhead, copy, p1 - keyhead);
+	      copy += p1 - keyhead;
 	    }
 	}
       p0 = p1;