Skip to content

Commit d3327e5

Browse files
committed
Make Section::name return BnString in Rust API
Section names come from the binary itself, we want to preserve the name as is
1 parent 5c90674 commit d3327e5

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

rust/src/section.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,8 +89,8 @@ impl Section {
8989
SectionBuilder::new(name, range)
9090
}
9191

92-
pub fn name(&self) -> String {
93-
unsafe { BnString::into_string(BNSectionGetName(self.handle)) }
92+
pub fn name(&self) -> BnString {
93+
unsafe { BnString::from_raw(BNSectionGetName(self.handle)) }
9494
}
9595

9696
pub fn section_type(&self) -> String {

0 commit comments

Comments
 (0)