We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 481ef80 commit 9c47b1cCopy full SHA for 9c47b1c
crates/wasi-common/src/sandboxed_tty_writer.rs
@@ -113,9 +113,14 @@ where
113
self.write_char('�')?;
114
115
if let Some(invalid_sequence_length) = error.error_len() {
116
+ // An invalid sequence was encountered. Tell the application we've
117
+ // written those bytes (though actually, we replaced them with U+FFFD).
118
result += invalid_sequence_length;
119
+ // Set up `input` to resume writing after the end of the sequence.
120
input = &after_valid[invalid_sequence_length..];
121
} else {
122
+ // The end of the buffer was encountered unexpectedly. Tell the application
123
+ // we've written out the remainder of the buffer.
124
result += after_valid.len();
125
break;
126
}
0 commit comments