Commit b4564eed authored by Vysheng's avatar Vysheng

Fixed check_utf8

parent 01ea8796
...@@ -335,7 +335,7 @@ static int valid_utf8_char (const char *str) { ...@@ -335,7 +335,7 @@ static int valid_utf8_char (const char *str) {
int i; int i;
for (i = 0; i < n; i ++) { for (i = 0; i < n; i ++) {
if ((((unsigned char)(str[i])) & 0xc0) != 0x80) { if ((((unsigned char)(str[i + 1])) & 0xc0) != 0x80) {
return -1; return -1;
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment