Fixed check_utf8
This commit is contained in:
parent
c7a15630c6
commit
f9528ff627
1 changed files with 1 additions and 1 deletions
|
@ -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…
Add table
Reference in a new issue