Skip to content

Commit ed25dac

Browse files
merge from connoranderson:connor/fix_str_tmp_conversion
1 parent 0594263 commit ed25dac

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

include/zenoh/api/bytes.hxx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ class Bytes : public Owned<::z_owned_bytes_t> {
9494
using Dval = std::remove_reference_t<D>;
9595
using DroppableType = typename detail::closures::Droppable<Dval>;
9696
auto drop = DroppableType::into_context(std::forward<D>(d));
97-
::z_bytes_from_str(interop::as_owned_c_ptr(*this), const_cast<char*>(ptr->c_str()),
97+
::z_bytes_from_buf(interop::as_owned_c_ptr(*this), reinterpret_cast<uint8_t*>(ptr->data()), ptr->size(),
9898
detail::closures::_zenoh_drop_with_context, drop);
9999
}
100100

0 commit comments

Comments
 (0)