mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-01-18 08:51:45 -08:00
(char_string): Type of arg C changed to unsigned.
Signal an error if C is an invalid character code.
This commit is contained in:
parent
57cb2e6f26
commit
5aa91c9b30
1 changed files with 4 additions and 2 deletions
|
|
@ -100,7 +100,7 @@ char unibyte_has_multibyte_table[256];
|
|||
|
||||
int
|
||||
char_string (c, p)
|
||||
int c;
|
||||
unsigned c;
|
||||
unsigned char *p;
|
||||
{
|
||||
int bytes;
|
||||
|
|
@ -169,11 +169,13 @@ char_string (c, p)
|
|||
p[4] = (0x80 | (c & 0x3F));
|
||||
bytes = 5;
|
||||
}
|
||||
else
|
||||
else if (c <= MAX_CHAR)
|
||||
{
|
||||
c = CHAR_TO_BYTE8 (c);
|
||||
bytes = BYTE8_STRING (c, p);
|
||||
}
|
||||
else
|
||||
error ("Invalid character: %d", c);
|
||||
|
||||
return bytes;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue