mirror of https://github.com/microsoft/edit
Fix UTF-8 buffer prepending in read_stdin (#520)
This commit is contained in:
parent
b4cd1f6668
commit
7ece8c5a38
|
|
@ -202,8 +202,8 @@ pub fn read_stdin(arena: &Arena, mut timeout: time::Duration) -> Option<ArenaStr
|
|||
|
||||
// We got some leftover broken UTF8 from a previous read? Prepend it.
|
||||
if STATE.utf8_len != 0 {
|
||||
STATE.utf8_len = 0;
|
||||
buf.extend_from_slice(&STATE.utf8_buf[..STATE.utf8_len]);
|
||||
STATE.utf8_len = 0;
|
||||
}
|
||||
|
||||
loop {
|
||||
|
|
|
|||
Loading…
Reference in New Issue