(make_lispy_event): Check integerness and fix Lisp_Object/int mixup.

This commit is contained in:
Stefan Monnier 2001-11-06 15:07:31 +00:00
parent 4d994a7910
commit 7a6a97d7b9
2 changed files with 9 additions and 3 deletions

View file

@ -1,3 +1,8 @@
2001-11-06 Stefan Monnier <monnier@cs.yale.edu>
* keyboard.c (make_lispy_event): Check integerness and fix
Lisp_Object/int mixup.
2001-11-06 Pavel Jan,Bm(Bk <Pavel@Janik.cz>
* fns.c (copy_hash_table): Remove unused variable `v'.

View file

@ -4996,10 +4996,11 @@ make_lispy_event (event)
/* The third element of every position
should be the (x,y) pair. */
down = Fcar (Fcdr (Fcdr (start_pos)));
if (CONSP (down))
if (CONSP (down)
&& INTEGERP (XCAR (down)) && INTEGERP (XCDR (down)))
{
xdiff = event->x - XCAR (down);
ydiff = event->y - XCDR (down);
xdiff = XFASTINT (event->x) - XFASTINT (XCAR (down));
ydiff = XFASTINT (event->y) - XFASTINT (XCDR (down));
}
if (xdiff < double_click_fuzz && xdiff > - double_click_fuzz