summaryrefslogtreecommitdiff
path: root/rust/src/function.rs
diff options
context:
space:
mode:
Diffstat (limited to 'rust/src/function.rs')
-rw-r--r--rust/src/function.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/rust/src/function.rs b/rust/src/function.rs
index 079d0ae5..16debf18 100644
--- a/rust/src/function.rs
+++ b/rust/src/function.rs
@@ -164,7 +164,7 @@ impl Function {
}
pub fn set_comment<S: BnStrCompatible>(&self, comment: S) {
- let raw = comment.as_bytes_with_nul();
+ let raw = comment.into_bytes_with_nul();
unsafe {
BNSetFunctionComment(self.handle, raw.as_ref().as_ptr() as *mut _);
@@ -176,7 +176,7 @@ impl Function {
}
pub fn set_comment_at<S: BnStrCompatible>(&self, addr: u64, comment: S) {
- let raw = comment.as_bytes_with_nul();
+ let raw = comment.into_bytes_with_nul();
unsafe {
BNSetCommentForAddress(self.handle, addr, raw.as_ref().as_ptr() as *mut _);