From ed25dac11b0d7e93c60fb6bb5bacf0c658dfdc5b Mon Sep 17 00:00:00 2001 From: Denis Biryukov Date: Wed, 15 Jan 2025 10:25:30 +0100 Subject: [PATCH] merge from connoranderson:connor/fix_str_tmp_conversion --- include/zenoh/api/bytes.hxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/zenoh/api/bytes.hxx b/include/zenoh/api/bytes.hxx index 278ac6ba..d28effd2 100644 --- a/include/zenoh/api/bytes.hxx +++ b/include/zenoh/api/bytes.hxx @@ -94,7 +94,7 @@ class Bytes : public Owned<::z_owned_bytes_t> { using Dval = std::remove_reference_t; using DroppableType = typename detail::closures::Droppable; auto drop = DroppableType::into_context(std::forward(d)); - ::z_bytes_from_str(interop::as_owned_c_ptr(*this), const_cast(ptr->c_str()), + ::z_bytes_from_buf(interop::as_owned_c_ptr(*this), reinterpret_cast(ptr->data()), ptr->size(), detail::closures::_zenoh_drop_with_context, drop); }