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 1a22daa commit 24d3bdfCopy full SHA for 24d3bdf
aw-server/src/android/mod.rs
@@ -83,8 +83,8 @@ pub mod android {
83
}
84
85
unsafe fn jstring_to_string(env: &JNIEnv, string: JString) -> String {
86
- let c_str = CStr::from_ptr(env.get_string(string).expect("invalid string").as_ptr());
87
- String::from(c_str.to_str().unwrap())
+ let jstr = env.get_string(string).expect("Failed to get Java string");
+ jstr.into()
88
89
90
unsafe fn string_to_jstring(env: &JNIEnv, string: String) -> jstring {
0 commit comments