changeset 3515:9d0af0f2dc0d

(access_keymap, store_in_keymap): Discard meaningless high bits of a character event.
author Richard M. Stallman <rms@gnu.org>
date Sun, 06 Jun 1993 06:45:22 +0000
parents 7a3e241a2917
children f1ca34ddfd84
files src/keymap.c
diffstat 1 files changed, 8 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/keymap.c	Sun Jun 06 05:28:30 1993 +0000
+++ b/src/keymap.c	Sun Jun 06 06:45:22 1993 +0000
@@ -272,6 +272,10 @@
      be put in the canonical order.  */
   if (XTYPE (idx) == Lisp_Symbol)
     idx = reorder_modifiers (idx);
+  else if (INTEGERP (idx))
+    /* Clobber the high bits that can be present on a machine
+       with more than 24 bits of integer.  */
+    XFASTINT (idx) = XINT (idx) & ((1 << 24) - 1);
 
   {
     Lisp_Object tail;
@@ -368,7 +372,10 @@
      be put in the canonical order.  */
   if (XTYPE (idx) == Lisp_Symbol)
     idx = reorder_modifiers (idx);
-
+  else if (INTEGERP (idx))
+    /* Clobber the high bits that can be present on a machine
+       with more than 24 bits of integer.  */
+    XFASTINT (idx) = XINT (idx) & ((1 << 24) - 1);
 
   /* Scan the keymap for a binding of idx.  */
   {