summaryrefslogtreecommitdiff
path: root/rust/src/section.rs
diff options
context:
space:
mode:
authorMason Reed <mason@vector35.com>2025-05-04 20:33:35 -0400
committerMason Reed <35282038+emesare@users.noreply.github.com>2025-05-12 17:45:24 -0400
commite12dac56c123bcf39708cb381497753250eb1887 (patch)
tree30aef8aa509e52b8e09b29479a447c194b5046ee /rust/src/section.rs
parent788a8b7091bbdde77817030e0836d7a7a786fd99 (diff)
[Rust] Make `Section::name` return `BnString`
Section names come from the binary itself, we want to preserve the name as is
Diffstat (limited to 'rust/src/section.rs')
-rw-r--r--rust/src/section.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/rust/src/section.rs b/rust/src/section.rs
index 53afffb3..a86c54e2 100644
--- a/rust/src/section.rs
+++ b/rust/src/section.rs
@@ -89,8 +89,8 @@ impl Section {
SectionBuilder::new(name, range)
}
- pub fn name(&self) -> String {
- unsafe { BnString::into_string(BNSectionGetName(self.handle)) }
+ pub fn name(&self) -> BnString {
+ unsafe { BnString::from_raw(BNSectionGetName(self.handle)) }
}
pub fn section_type(&self) -> String {