CStr::from_ptr may expect *i8 or *u8 depending on target

This commit is contained in:
Robert Bragg
2022-08-12 01:16:19 +01:00
parent f54eaa2997
commit 190a3b91e7
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -379,7 +379,7 @@ impl AndroidAppInner {
return None;
}
let cstr = unsafe {
let cstr_slice = CStr::from_ptr(path);
let cstr_slice = CStr::from_ptr(path.cast());
cstr_slice.to_str().ok()?
};
if cstr.len() == 0 {
+1 -1
View File
@@ -412,7 +412,7 @@ impl AndroidAppInner {
return None;
}
let cstr = unsafe {
let cstr_slice = CStr::from_ptr(path);
let cstr_slice = CStr::from_ptr(path.cast());
cstr_slice.to_str().ok()?
};
if cstr.len() == 0 {