# HG changeset patch # User Dave Love # Date 1044386666 0 # Node ID b93d02d6a69ed5f0e7fc66ef04c09b9ec5196bda # Parent c25cbf7ce916c41bb4071137b5c0d951256af501 (XTread_socket): Check Lisp types for Vx_keysym_table and fix C types. diff -r c25cbf7ce916 -r b93d02d6a69e src/xterm.c --- a/src/xterm.c Fri Jan 31 06:11:29 2003 +0000 +++ b/src/xterm.c Tue Feb 04 19:24:26 2003 +0000 @@ -10571,14 +10571,15 @@ 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