about summary refs log tree commit diff
diff options
context:
space:
mode:
authorCount Count <countvoncount123456@gmail.com>2021-03-24 18:23:01 +0100
committerCount Count <countvoncount123456@gmail.com>2021-03-24 18:23:01 +0100
commitdd3b79e9ffd7559896d20546b6ba4069032f2811 (patch)
tree475baaafc3d22bc8cdcacd1aad2e069946ba864f
parent7cfbe5429458151f6cb2fbd5fe2e44c56a18b644 (diff)
downloadrust-dd3b79e9ffd7559896d20546b6ba4069032f2811.tar.gz
rust-dd3b79e9ffd7559896d20546b6ba4069032f2811.zip
comment pos
-rw-r--r--library/std/src/sys/windows/stdio.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/library/std/src/sys/windows/stdio.rs b/library/std/src/sys/windows/stdio.rs
index 8fb0f2f9ee7..0379a54e507 100644
--- a/library/std/src/sys/windows/stdio.rs
+++ b/library/std/src/sys/windows/stdio.rs
@@ -84,8 +84,8 @@ fn write(
             "Unexpected number of bytes for incomplete UTF-8 codepoint."
         );
         if data[0] >> 6 != 0b10 {
-            incomplete_utf8.len = 0;
             // not a continuation byte - reject
+            incomplete_utf8.len = 0;
             return Err(io::Error::new_const(
                 io::ErrorKind::InvalidData,
                 &"Windows stdio in console mode does not support writing non-UTF-8 byte sequences",