changeset 90695:a1cd7344d6a2

(font_parse_xlfd): Fix the array size of `f'. (register_font_driver): Use EQ to compare driver->type.
author Kenichi Handa <handa@m17n.org>
date Wed, 29 Nov 2006 12:09:56 +0000
parents 648518494384
children 46ca345eec0b
files src/font.c
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/font.c	Wed Nov 29 08:15:46 2006 +0000
+++ b/src/font.c	Wed Nov 29 12:09:56 2006 +0000
@@ -751,7 +751,7 @@
   int i, j;
   Lisp_Object dpi, spacing;
   int avgwidth;
-  char *f[XLFD_LAST_INDEX];
+  char *f[XLFD_LAST_INDEX + 1];
   Lisp_Object val;
   char *p;
 
@@ -2808,7 +2808,7 @@
 	   SDATA (SYMBOL_NAME (driver->type)));
 
   for (prev = NULL, list = root; list; prev = list, list = list->next)
-    if (list->driver->type == driver->type)
+    if (EQ (list->driver->type, driver->type))
       error ("Duplicated font driver: %s", SDATA (SYMBOL_NAME (driver->type)));
 
   list = malloc (sizeof (struct font_driver_list));