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:
parent
c6c16fb3f8
commit
86c19714b0
1 changed files with 3 additions and 1 deletions
|
@ -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));
|
||||
|
|
Loading…
Add table
Reference in a new issue