We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 340ac04 commit 72e0800Copy full SHA for 72e0800
src/libstd/os.rs
@@ -646,6 +646,7 @@ fn real_args_as_bytes() -> Vec<Vec<u8>> {
646
// res
647
#[cfg(target_os = "ios")]
648
fn real_args_as_bytes() -> Vec<Vec<u8>> {
649
+ use ffi::c_str_to_bytes;
650
use iter::range;
651
use mem;
652
@@ -680,8 +681,7 @@ fn real_args_as_bytes() -> Vec<Vec<u8>> {
680
681
let tmp = objc_msgSend(args, objectAtSel, i);
682
let utf_c_str: *const libc::c_char =
683
mem::transmute(objc_msgSend(tmp, utf8Sel));
- let s = CString::new(utf_c_str, false);
684
- res.push(s.as_bytes_no_nul().to_vec())
+ res.push(c_str_to_bytes(&utf_c_str).to_vec());
685
}
686
687
0 commit comments