mirror of
https://github.com/MariaDB/server.git
synced 2026-05-15 19:37:16 +02:00
ctype-utf8.c, ctype-sjis.c:
Safer and mode readable way. strings/ctype-sjis.c: Safer and mode readable way. strings/ctype-utf8.c: Safer and mode readable way.
This commit is contained in:
parent
db5bb0c46c
commit
0b45706c3b
2 changed files with 3 additions and 13 deletions
|
|
@ -4576,12 +4576,7 @@ uint my_well_formed_len_sjis(CHARSET_INFO *cs __attribute__((unused)),
|
|||
const char *b0= b;
|
||||
while (pos && b < e)
|
||||
{
|
||||
/*
|
||||
Cast to int8 for extra safety.
|
||||
"char" can be unsigned by default
|
||||
on some platforms.
|
||||
*/
|
||||
if (((int8)b[0]) >= 0)
|
||||
if ((uchar) b[0] < 128)
|
||||
{
|
||||
/* Single byte ascii character */
|
||||
b++;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue