Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Count-Count committed Mar 24, 2021
1 parent d114694 commit 52713a4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion library/std/src/sys/windows/stdio.rs
Expand Up @@ -128,7 +128,7 @@ fn write(
let utf8 = match str::from_utf8(&data[..len]) {
Ok(s) => s,
Err(ref e) if e.valid_up_to() == 0 => {
first_byte_char_width = utf8_char_width(data[0]);
let first_byte_char_width = utf8_char_width(data[0]);
if first_byte_char_width > 1 && data.len() < first_byte_char_width {
incomplete_utf8.bytes[0] = data[0];
incomplete_utf8.len = 1;
Expand Down

0 comments on commit 52713a4

Please sign in to comment.