]> git.eshelyaron.com Git - emacs.git/commitdiff
(casify_object): Return OBJ unchanged if not real char.
authorRichard M. Stallman <rms@gnu.org>
Sat, 22 May 2004 22:19:28 +0000 (22:19 +0000)
committerRichard M. Stallman <rms@gnu.org>
Sat, 22 May 2004 22:19:28 +0000 (22:19 +0000)
src/casefiddle.c

index ae60d2c8dd563d061203f904540520f2127c01a9..6387c4bc845374ae5538fb48bbb27c99be6f2c4e 100644 (file)
@@ -52,6 +52,12 @@ casify_object (flag, obj)
                          | CHAR_SHIFT | CHAR_CTL | CHAR_META);
          int flags = XINT (obj) & flagbits;
 
+         /* If the character has higher bits set
+            above the flags, return it unchanged.
+            It is not a real character.  */
+         if ((unsigned) XFASTINT (obj) > (unsigned) flagbits)
+           return obj;
+
          c = DOWNCASE (XFASTINT (obj) & ~flagbits);
          if (inword)
            XSETFASTINT (obj, c | flags);