]> git.eshelyaron.com Git - emacs.git/commitdiff
(XTread_socket): Check Lisp types for Vx_keysym_table
authorDave Love <fx@gnu.org>
Tue, 4 Feb 2003 19:24:26 +0000 (19:24 +0000)
committerDave Love <fx@gnu.org>
Tue, 4 Feb 2003 19:24:26 +0000 (19:24 +0000)
and fix C types.

src/xterm.c

index d878d6cce860410222045e22285dab2d5186e520..b6c63aacfa10f499cc3048ba246d0ea3c356c427 100644 (file)
@@ -10571,14 +10571,15 @@ XTread_socket (sd, bufp, numchars, expected)
                          numchars--;
                        }
                      /* Now non-ASCII.  */
-                     else if (! EQ ((c = Fgethash (make_number (keysym),
-                                                   Vx_keysym_table, Qnil)),
-                                    Qnil))
+                     else if (HASH_TABLE_P (Vx_keysym_table)
+                              && (CHARACTERP (c = Fgethash (make_number (keysym),
+                                                            Vx_keysym_table,
+                                                            Qnil))))
                        {
-                         bufp->kind = (ASCII_CHAR_P (c)
+                         bufp->kind = (ASCII_CHAR_P (XFASTINT (c))
                                        ? ascii_keystroke
                                        : multibyte_char_keystroke);
-                         bufp->code = c;
+                         bufp->code = XFASTINT (c);
                          XSETFRAME (bufp->frame_or_window, f);
                          bufp->arg = Qnil;
                          bufp->modifiers