Fix UTF-8 buffer prepending in read_stdin (#520)

This commit is contained in:
Mani Tofigh 2025-06-25 09:59:06 -04:00 committed by GitHub
parent b4cd1f6668
commit 7ece8c5a38
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 1 deletions

View File

@ -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 {