Commit 69fe4180 authored by Richard M. Stallman's avatar Richard M. Stallman
Browse files

(casify_object): Return OBJ unchanged if not real char.

parent 73ccc854
...@@ -52,6 +52,12 @@ casify_object (flag, obj) ...@@ -52,6 +52,12 @@ casify_object (flag, obj)
| CHAR_SHIFT | CHAR_CTL | CHAR_META); | CHAR_SHIFT | CHAR_CTL | CHAR_META);
int flags = XINT (obj) & flagbits; 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); c = DOWNCASE (XFASTINT (obj) & ~flagbits);
if (inword) if (inword)
XSETFASTINT (obj, c | flags); XSETFASTINT (obj, c | flags);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment