Fix assertion violation in define-key

* src/keymap.c (store_in_keymap): Don't use XFASTINT on non-character
objects.  Reported by Drew Adams <drew.adams@oracle.com>
and Juanma Barranquero <lekktu@gmail.com>.
This commit is contained in:
Eli Zaretskii 2015-11-09 20:31:45 +02:00
parent c6c16fb3f8
commit 86c19714b0

View file

@ -853,7 +853,9 @@ store_in_keymap (Lisp_Object keymap, register Lisp_Object idx, Lisp_Object def)
XSETCDR (elt, def);
return def;
}
else if (CONSP (idx) && CHARACTERP (XCAR (idx)))
else if (CONSP (idx)
&& CHARACTERP (XCAR (idx))
&& CHARACTERP (XCAR (elt)))
{
int from = XFASTINT (XCAR (idx));
int to = XFASTINT (XCDR (idx));