Skip to content

Commit dc773a6

Browse files
committed
commit: typofix for xxFFF[EF] check
We wanted to catch all codepoints that ends with FFFE and FFFF, not with 0FFFE and 0FFFF. Noticed and corrected by Peter Krefting. Signed-off-by: Junio C Hamano <[email protected]>
1 parent 81050ac commit dc773a6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

commit.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1306,7 +1306,7 @@ static int find_invalid_utf8(const char *buf, int len)
13061306
if ((codepoint & 0x1ff800) == 0xd800)
13071307
return bad_offset;
13081308
/* U+xxFFFE and U+xxFFFF are guaranteed non-characters. */
1309-
if ((codepoint & 0xffffe) == 0xfffe)
1309+
if ((codepoint & 0xfffe) == 0xfffe)
13101310
return bad_offset;
13111311
/* So are anything in the range U+FDD0..U+FDEF. */
13121312
if (codepoint >= 0xfdd0 && codepoint <= 0xfdef)

0 commit comments

Comments
 (0)