From e12dac56c123bcf39708cb381497753250eb1887 Mon Sep 17 00:00:00 2001 From: Mason Reed Date: Sun, 4 May 2025 20:33:35 -0400 Subject: [Rust] Make `Section::name` return `BnString` Section names come from the binary itself, we want to preserve the name as is --- rust/src/section.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'rust/src') 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 { -- cgit v1.3.1