From 845fe94ef05772ed85d22e457b316316b6255b8a Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Wed, 12 Jun 1996 15:20:37 +0000 Subject: [PATCH] (read_char): Use unsigned to compare against the size of Vkeyboard_translate_table. Check size for char-table too. --- src/keyboard.c | 7 ++++--- 1 file 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); -- 2.39.2