diff --git a/crates/nit/src/system/syscall.rs b/crates/nit/src/system/syscall.rs index 3a5789f..72dc32d 100644 --- a/crates/nit/src/system/syscall.rs +++ b/crates/nit/src/system/syscall.rs @@ -207,7 +207,7 @@ pub fn execv(command: impl AsRef, 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()))