mirror of
https://git.savannah.gnu.org/git/emacs.git
synced 2025-01-02 11:21:42 +00:00
(char_to_string): Check the character validity.
(char_valid_p): If C is not less than MAX_CHAR, be sure to return 0.
This commit is contained in:
parent
71c72a72ac
commit
0e235b7e3a
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user