From 69fe4180e4a4d44fc2579e488204031c6e012917 Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Sat, 22 May 2004 22:19:28 +0000 Subject: [PATCH] (casify_object): Return OBJ unchanged if not real char. --- src/casefiddle.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/casefiddle.c b/src/casefiddle.c index ae60d2c8dd5..6387c4bc845 100644 --- a/src/casefiddle.c +++ b/src/casefiddle.c @@ -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); -- 2.39.5