UTF-8 parsing fix

This commit is contained in:
Mathias Panzenböck 2021-09-02 06:21:12 +02:00
parent 106759299b
commit 00a5c547ef
1 changed files with 1 additions and 1 deletions

View File

@ -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;
}