From a41c1bada13bc8153636391f4b8c31902797443e Mon Sep 17 00:00:00 2001 From: Jannik Date: Fri, 24 May 2024 08:10:02 +0000 Subject: [PATCH] resize at runtime not at compile time --- io_context/include/msg_converters/udp_msgs.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/io_context/include/msg_converters/udp_msgs.hpp b/io_context/include/msg_converters/udp_msgs.hpp index fb1b3e2c..d07f1780 100644 --- a/io_context/include/msg_converters/udp_msgs.hpp +++ b/io_context/include/msg_converters/udp_msgs.hpp @@ -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()); }