Commit cf23b845 authored by Kenichi Handa's avatar Kenichi Handa

(font_parse_xlfd): Fix the array size of `f'.

(register_font_driver): Use EQ to compare driver->type.
parent ce2a515f
......@@ -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));
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment