diff options
| author | Richard M. Stallman | 1996-06-12 15:20:37 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 1996-06-12 15:20:37 +0000 |
| commit | 845fe94ef05772ed85d22e457b316316b6255b8a (patch) | |
| tree | af645b8fb7d2588c9e3b224a3a8f74995d1e73b7 /src | |
| parent | 27f94c9b4793e83d9bb02e0e0c225201032cf41b (diff) | |
| download | emacs-845fe94ef05772ed85d22e457b316316b6255b8a.tar.gz emacs-845fe94ef05772ed85d22e457b316316b6255b8a.zip | |
(read_char): Use unsigned to compare against
the size of Vkeyboard_translate_table.
Check size for char-table too.
Diffstat (limited to 'src')
| -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) | |||
| 2096 | return c; | 2096 | return c; |
| 2097 | 2097 | ||
| 2098 | if (STRINGP (Vkeyboard_translate_table) | 2098 | if (STRINGP (Vkeyboard_translate_table) |
| 2099 | && XSTRING (Vkeyboard_translate_table)->size > XFASTINT (c)) | 2099 | && XSTRING (Vkeyboard_translate_table)->size > (unsigned) XFASTINT (c)) |
| 2100 | XSETINT (c, XSTRING (Vkeyboard_translate_table)->data[XFASTINT (c)]); | 2100 | XSETINT (c, XSTRING (Vkeyboard_translate_table)->data[XFASTINT (c)]); |
| 2101 | else if ((VECTORP (Vkeyboard_translate_table) | 2101 | else if ((VECTORP (Vkeyboard_translate_table) |
| 2102 | && XVECTOR (Vkeyboard_translate_table)->size > XFASTINT (c)) | 2102 | && XVECTOR (Vkeyboard_translate_table)->size > (unsigned) XFASTINT (c)) |
| 2103 | || CHAR_TABLE_P (Vkeyboard_translate_table)) | 2103 | || (CHAR_TABLE_P (Vkeyboard_translate_table) |
| 2104 | && CHAR_TABLE_ORDINARY_SLOTS > (unsigned) XFASTINT (c))) | ||
| 2104 | { | 2105 | { |
| 2105 | Lisp_Object d; | 2106 | Lisp_Object d; |
| 2106 | d = Faref (Vkeyboard_translate_table, c); | 2107 | d = Faref (Vkeyboard_translate_table, c); |