changeset 55743:4f33fa491183

(casify_object): Return OBJ unchanged if not real char.
author Richard M. Stallman <rms@gnu.org>
date Sat, 22 May 2004 22:19:28 +0000
parents a5ccd5ee3c52
children dc4797dbcccd
files src/casefiddle.c
diffstat 1 files changed, 6 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/casefiddle.c	Sat May 22 22:18:30 2004 +0000
+++ b/src/casefiddle.c	Sat May 22 22:19:28 2004 +0000
@@ -52,6 +52,12 @@
 			  | 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);