From cf23b84580cfc27c29b66bb16ebbdf9acf104604 Mon Sep 17 00:00:00 2001 From: Kenichi Handa Date: Wed, 29 Nov 2006 12:09:56 +0000 Subject: [PATCH] (font_parse_xlfd): Fix the array size of `f'. (register_font_driver): Use EQ to compare driver->type. --- src/font.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/font.c b/src/font.c index a4c120981ba..b0838cee1c0 100644 --- a/src/font.c +++ b/src/font.c @@ -751,7 +751,7 @@ font_parse_xlfd (name, font) 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 @@ register_font_driver (driver, f) 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)); -- 2.39.5