From: Kenichi Handa Date: Sat, 26 Aug 2000 01:07:49 +0000 (+0000) Subject: (char_to_string): Check the character validity. X-Git-Tag: emacs-pretest-21.0.90~1972 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=0e235b7e3ab810cd797fe8d163da7de232832e12;p=emacs.git (char_to_string): Check the character validity. (char_valid_p): If C is not less than MAX_CHAR, be sure to return 0. --- diff --git a/src/charset.c b/src/charset.c index bc0b5ff7ee3..f350572a9d2 100644 --- a/src/charset.c +++ b/src/charset.c @@ -221,7 +221,7 @@ char_to_string (c, str) *p++ = c + 0x20; } } - else if (c < MAX_CHAR) + else if (CHAR_VALID_P (c)) { int charset, c1, c2; @@ -1076,7 +1076,7 @@ char_valid_p (c, genericp) { int charset, c1, c2; - if (c < 0) + if (c < 0 || c >= MAX_CHAR) return 0; if (SINGLE_BYTE_CHAR_P (c)) return 1;