changeset 40775:2b25276add88

(make_lispy_event): Check integerness and fix Lisp_Object/int mixup.
author Stefan Monnier <monnier@iro.umontreal.ca>
date Tue, 06 Nov 2001 15:07:16 +0000
parents 0653f60cebd3
children 0be004bf832e
files src/keyboard.c
diffstat 1 files changed, 4 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/src/keyboard.c	Tue Nov 06 13:22:01 2001 +0000
+++ b/src/keyboard.c	Tue Nov 06 15:07:16 2001 +0000
@@ -4996,10 +4996,11 @@
 		/* 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