actually use the CStr versions instead of Rustic

This commit is contained in:
Ryan Heywood 2025-07-12 14:50:09 -04:00
parent 32570cc3b9
commit c3c7e9eaa3
Signed by: ryan
GPG Key ID: 8E401478A3FBEF72
1 changed files with 1 additions and 1 deletions

View File

@ -207,7 +207,7 @@ pub fn execv(command: impl AsRef<Path>, args: &[&str]) -> Result<()> {
// NOTE: The last arg must be a null pointer, but we can't construct a CString from nullptr, so
// we construct an array of pointers and use that
let args_ptrs: Vec<_> = args
let args_ptrs: Vec<_> = args_cstr
.iter()
.map(|s| s.as_ptr())
.chain(std::iter::once(std::ptr::null()))