mirror of
https://github.com/rust-mobile/android-activity.git
synced 2026-07-13 01:58:54 +00:00
CStr::from_ptr may expect *i8 or *u8 depending on target
This commit is contained in:
@@ -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 {
|
||||
|
||||
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user