diff --git a/io_context/include/msg_converters/udp_msgs.hpp b/io_context/include/msg_converters/udp_msgs.hpp index fb1b3e2..fe63a33 100644 --- a/io_context/include/msg_converters/udp_msgs.hpp +++ b/io_context/include/msg_converters/udp_msgs.hpp @@ -21,7 +21,7 @@ #include #include - +#include namespace drivers { @@ -34,7 +34,7 @@ namespace common */ inline void from_msg(const udp_msgs::msg::UdpPacket::SharedPtr & in, std::vector & out) { - out.resize(sizeof(in->data)); + out.resize(in->data.size()); std::copy(in->data.begin(), in->data.end(), out.begin()); }