summaryrefslogtreecommitdiff
path: root/rust/src/data_buffer.rs
diff options
context:
space:
mode:
Diffstat (limited to 'rust/src/data_buffer.rs')
-rw-r--r--rust/src/data_buffer.rs3
1 files changed, 2 insertions, 1 deletions
diff --git a/rust/src/data_buffer.rs b/rust/src/data_buffer.rs
index bfffc33f..a3f51d54 100644
--- a/rust/src/data_buffer.rs
+++ b/rust/src/data_buffer.rs
@@ -120,7 +120,8 @@ impl DataBuffer {
}
}
- pub fn from_escaped_string(value: &BnString) -> Self {
+ pub fn from_escaped_string(value: &str) -> Self {
+ let value = value.to_cstr();
Self(unsafe { BNDecodeEscapedString(value.as_ptr()) })
}