Skip to content

Commit 1269b97

Browse files
committed
[Parse] Correct the range for the start of a UTF8 character
1 parent c5840e8 commit 1269b97

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/Parse/Lexer.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ static unsigned CLO8(unsigned char C) {
102102
static bool isStartOfUTF8Character(unsigned char C) {
103103
// RFC 2279: The octet values FE and FF never appear.
104104
// RFC 3629: The octet values C0, C1, F5 to FF never appear.
105-
return C <= 0x80 || (C >= 0xC2 && C < 0xF5);
105+
return C < 0x80 || (C >= 0xC2 && C < 0xF5);
106106
}
107107

108108
/// validateUTF8CharacterAndAdvance - Given a pointer to the starting byte of a

0 commit comments

Comments
 (0)