]> git.eshelyaron.com Git - emacs.git/commitdiff
(XTread_socket): Check Lisp types for Vx_keysym_table
authorDave Love <fx@gnu.org>
Mon, 4 Nov 2002 14:29:04 +0000 (14:29 +0000)
committerDave Love <fx@gnu.org>
Mon, 4 Nov 2002 14:29:04 +0000 (14:29 +0000)
and fix C types.

src/xterm.c

index 1b16ba8505571485941db49e752127f861c9d769..eef2eb159764c732be1e78805261512e8ead4d4b 100644 (file)
@@ -10758,14 +10758,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)
+                              && (NATNUMP (c = Fgethash (make_number (keysym),
+                                                         Vx_keysym_table,
+                                                         Qnil))))
                        {
-                         bufp->kind = (SINGLE_BYTE_CHAR_P (c)
+                         bufp->kind = (SINGLE_BYTE_CHAR_P (XFASTINT (c))
                                        ? ASCII_KEYSTROKE_EVENT
                                        : MULTIBYTE_CHAR_KEYSTROKE_EVENT);
-                         bufp->code = c;
+                         bufp->code = XFASTINT (c);
                          XSETFRAME (bufp->frame_or_window, f);
                          bufp->arg = Qnil;
                          bufp->modifiers