diff options
| author | Joe Rozner <joe@deadbytes.net> | 2026-05-10 17:17:17 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-05-10 17:17:17 -0700 |
| commit | 73c8554b8d5d460ed8fc331e787b9b272882e9b1 (patch) | |
| tree | 579b268768123b702ac27f466870fefba7a2558d | |
| parent | 698780be936560dc11a19b80d0236f80d9753b42 (diff) | |
[Rust] Fix `load_with_options_and_progress` when options is `None`
A similar fix was applied for `load_view_with_options` inhttps://github.com/Vector35/binaryninja-api/commit/ff58143ff7794d7251f9182294dd25bd4cbe15eb but was not applied here. This allows `None` to be correctly passed for options.
| -rw-r--r-- | rust/src/lib.rs | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/rust/src/lib.rs b/rust/src/lib.rs index f420fa30..62ee776e 100644 --- a/rust/src/lib.rs +++ b/rust/src/lib.rs @@ -94,8 +94,6 @@ use crate::progress::{NoProgressCallback, ProgressCallback}; use crate::string::raw_to_string; use binary_view::BinaryView; use binaryninjacore_sys::*; -use metadata::Metadata; -use metadata::MetadataType; use rc::Ref; use std::cmp; use std::collections::HashMap; @@ -199,11 +197,7 @@ where .to_bytes_with_nul() .to_vec() } else { - Metadata::new_of_type(MetadataType::KeyValueDataType) - .get_json_string() - .ok()? - .as_ref() - .to_vec() + "{}".to_cstr().to_bytes_with_nul().to_vec() }; let handle = unsafe { BNLoadFilename( |
