Commit 86c19714 authored by Eli Zaretskii's avatar Eli Zaretskii

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>.
parent c6c16fb3
......@@ -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));
......
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