From 969be7c0ad1b93929dc62d793cf7a4e426a37098 Mon Sep 17 00:00:00 2001 From: iceweasel-oai Date: Mon, 23 Mar 2026 15:57:14 -0700 Subject: [PATCH] fix compile issues --- codex-rs/windows-sandbox-rs/src/proc_thread_attr.rs | 3 ++- codex-rs/windows-sandbox-rs/src/unified_exec/session.rs | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/codex-rs/windows-sandbox-rs/src/proc_thread_attr.rs b/codex-rs/windows-sandbox-rs/src/proc_thread_attr.rs index 2567932ce5..ce19b70089 100644 --- a/codex-rs/windows-sandbox-rs/src/proc_thread_attr.rs +++ b/codex-rs/windows-sandbox-rs/src/proc_thread_attr.rs @@ -45,12 +45,13 @@ impl ProcThreadAttributeList { pub fn set_pseudoconsole(&mut self, hpc: isize) -> io::Result<()> { let list = self.as_mut_ptr(); + let mut hpc_value = hpc; let ok = unsafe { UpdateProcThreadAttribute( list, 0, PROC_THREAD_ATTRIBUTE_PSEUDOCONSOLE, - hpc as *mut _, + (&mut hpc_value as *mut isize).cast(), std::mem::size_of::(), std::ptr::null_mut(), std::ptr::null_mut(), diff --git a/codex-rs/windows-sandbox-rs/src/unified_exec/session.rs b/codex-rs/windows-sandbox-rs/src/unified_exec/session.rs index 5279d78596..cfae037adc 100644 --- a/codex-rs/windows-sandbox-rs/src/unified_exec/session.rs +++ b/codex-rs/windows-sandbox-rs/src/unified_exec/session.rs @@ -355,9 +355,10 @@ fn start_runner_stdin_writer( stdin_open: bool, ) -> tokio::task::JoinHandle<()> { tokio::task::spawn_blocking(move || { + let mut previous_was_cr = false; while let Some(bytes) = writer_rx.blocking_recv() { let bytes = if normalize_newlines { - normalize_windows_tty_input(&bytes) + normalize_windows_tty_input(&bytes, &mut previous_was_cr) } else { bytes };