diff options
| author | Rubens Brandao <git@rubens.io> | 2024-04-06 16:32:00 -0300 |
|---|---|---|
| committer | Kyle Martin <krm504@nyu.edu> | 2024-04-09 13:39:49 -0400 |
| commit | 193dea95daedde471e6f1fbcbeaf1932c6fbd50c (patch) | |
| tree | 99be67d81a899543ed5e4636eea3d589583e48a5 /rust/src/interaction.rs | |
| parent | a6b48153b64a227c3492d77a96e679b8c469034c (diff) | |
replace BStr with str
Diffstat (limited to 'rust/src/interaction.rs')
| -rw-r--r-- | rust/src/interaction.rs | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/rust/src/interaction.rs b/rust/src/interaction.rs index 7e549253..ccb5c81a 100644 --- a/rust/src/interaction.rs +++ b/rust/src/interaction.rs @@ -16,12 +16,13 @@ use binaryninjacore_sys::*; +use std::ffi::CStr; use std::os::raw::{c_char, c_void}; use std::path::PathBuf; use crate::binaryview::BinaryView; use crate::rc::Ref; -use crate::string::{BnStr, BnStrCompatible, BnString}; +use crate::string::{BnStrCompatible, BnString}; pub fn get_text_line_input(prompt: &str, title: &str) -> Option<String> { let mut value: *mut libc::c_char = std::ptr::null_mut(); @@ -499,7 +500,10 @@ impl FormInputBuilder { | BNFormInputFieldType::SaveFileNameFormField | BNFormInputFieldType::DirectoryNameFormField => { FormResponses::String(unsafe { - BnStr::from_raw(form_field.stringResult).to_string() + CStr::from_ptr(form_field.stringResult) + .to_str() + .unwrap() + .to_owned() }) } |
