Use new Rust CStr constant (#1993)

This commit is contained in:
Dominik Maier 2024-04-02 10:28:20 +02:00 committed by GitHub
parent 63a6d1aac0
commit aaafe1fc6c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -118,7 +118,7 @@ pub extern "C" fn main(_argc: isize, _argv: *const *const u8) -> isize {
#[cfg(any(windows, unix))] #[cfg(any(windows, unix))]
unsafe { unsafe {
let s = CString::new(s).unwrap(); let s = CString::new(s).unwrap();
printf(b"%s\n\0".as_ptr().cast(), s.as_ptr()); printf(c"%s\n".as_ptr().cast(), s.as_ptr());
} }
}); });