UTF-8 parsing fix
This commit is contained in:
parent
106759299b
commit
00a5c547ef
|
@ -52,7 +52,7 @@ const uint8_t *decode_utf8_codepoint(const uint8_t *str, size_t size, codepoint_
|
|||
cp = byte1;
|
||||
str += 1;
|
||||
}
|
||||
else if (byte1 < 0xC2) {
|
||||
else if (byte1 < 0xBF) {
|
||||
// unexpected continuation or overlong 2-byte sequence
|
||||
return NULL;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue