Fixed check_utf8
This commit is contained in:
parent
01ea879687
commit
b4564eed7a
@ -335,7 +335,7 @@ static int valid_utf8_char (const char *str) {
|
||||
|
||||
int i;
|
||||
for (i = 0; i < n; i ++) {
|
||||
if ((((unsigned char)(str[i])) & 0xc0) != 0x80) {
|
||||
if ((((unsigned char)(str[i + 1])) & 0xc0) != 0x80) {
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user