Fix bad integer promotion in mysqlnd big5 charset detection

This commit is contained in:
Pierrick Charron 2022-06-09 22:03:24 -04:00
parent 62f64141ef
commit df4dd82ea0
No known key found for this signature in database
GPG Key ID: 286AF1F9897469DC

View File

@ -188,9 +188,9 @@ static unsigned int mysqlnd_mbcharlen_utf8(const unsigned int utf8)
/* {{{ big5 functions */
#define valid_big5head(c) (0xA1 <= (unsigned int)(c) && (unsigned int)(c) <= 0xF9)
#define valid_big5tail(c) ((0x40 <= (unsigned int)(c) && (unsigned int)(c) <= 0x7E) || \
(0xA1 <= (unsigned int)(c) && (unsigned int)(c) <= 0xFE))
#define valid_big5head(c) (0xA1 <= (zend_uchar)(c) && (zend_uchar)(c) <= 0xF9)
#define valid_big5tail(c) ((0x40 <= (zend_uchar)(c) && (zend_uchar)(c) <= 0x7E) || \
(0xA1 <= (zend_uchar)(c) && (zend_uchar)(c) <= 0xFE))
#define isbig5code(c,d) (isbig5head(c) && isbig5tail(d))