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 7641bb5ed..b81469983 100644 --- a/codex-rs/windows-sandbox-rs/src/proc_thread_attr.rs +++ b/codex-rs/windows-sandbox-rs/src/proc_thread_attr.rs @@ -1,3 +1,4 @@ +use std::ffi::c_void; use std::io; use windows_sys::Win32::Foundation::GetLastError; use windows_sys::Win32::Foundation::HANDLE; @@ -45,14 +46,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, - (&mut hpc_value as *mut isize).cast(), - std::mem::size_of::(), + hpc as *mut c_void, + std::mem::size_of::(), std::ptr::null_mut(), std::ptr::null_mut(), )