diff options
author | Richard M. Stallman <rms@gnu.org> | 1996-06-12 15:20:37 +0000 |
---|---|---|
committer | Richard M. Stallman <rms@gnu.org> | 1996-06-12 15:20:37 +0000 |
commit | 845fe94ef05772ed85d22e457b316316b6255b8a (patch) | |
tree | af645b8fb7d2588c9e3b224a3a8f74995d1e73b7 /src/keyboard.c | |
parent | 27f94c9b4793e83d9bb02e0e0c225201032cf41b (diff) | |
download | emacs-845fe94ef05772ed85d22e457b316316b6255b8a.tar.gz |
(read_char): Use unsigned to compare against
the size of Vkeyboard_translate_table.
Check size for char-table too.
Diffstat (limited to 'src/keyboard.c')
-rw-r--r-- | src/keyboard.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/keyboard.c b/src/keyboard.c index aa9138a4bad..e9f6dc7e49e 100644 --- a/src/keyboard.c +++ b/src/keyboard.c @@ -2096,11 +2096,12 @@ read_char (commandflag, nmaps, maps, prev_event, used_mouse_menu) return c; if (STRINGP (Vkeyboard_translate_table) - && XSTRING (Vkeyboard_translate_table)->size > XFASTINT (c)) + && XSTRING (Vkeyboard_translate_table)->size > (unsigned) XFASTINT (c)) XSETINT (c, XSTRING (Vkeyboard_translate_table)->data[XFASTINT (c)]); else if ((VECTORP (Vkeyboard_translate_table) - && XVECTOR (Vkeyboard_translate_table)->size > XFASTINT (c)) - || CHAR_TABLE_P (Vkeyboard_translate_table)) + && XVECTOR (Vkeyboard_translate_table)->size > (unsigned) XFASTINT (c)) + || (CHAR_TABLE_P (Vkeyboard_translate_table) + && CHAR_TABLE_ORDINARY_SLOTS > (unsigned) XFASTINT (c))) { Lisp_Object d; d = Faref (Vkeyboard_translate_table, c); |