Skip to content

Commit 96af769

Browse files
committed
Fix missed error case
1 parent c6dc9ff commit 96af769

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

src/windows/mod.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,7 @@ mod tests {
126126
test_error(End(), b"\xF1\x80");
127127
test_error(End(), b"\xF1\x80\x80");
128128
test_error(Byte(b'\xF1'), b"\xF1\x80\x80\xF1");
129+
test_error(CodePoint(0x11_09CC), b"\xF4\x90\xA7\x8C");
129130
test_error(CodePoint(0x15_EC46), b"\xF5\x9E\xB1\x86");
130131
test_error(End(), b"\xFB");
131132
test_error(End(), b"\xFB\x80");

src/windows/wtf8/code_points.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ where
8080
r#continue!();
8181

8282
if byte >= 0xF0 {
83-
if code_point.wrapping_sub(0x10) > 0x100 {
83+
if code_point.wrapping_sub(0x10) >= 0x100 {
8484
invalid = true;
8585
}
8686
r#continue!();

0 commit comments

Comments
 (0)