Skip to content

Commit 5c369f0

Browse files
committed
fix bug in ros1 latency deserialization
introduced as part of refactoring for ros2 version
1 parent 207a618 commit 5c369f0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

mqtt_client/src/MqttClient.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -621,7 +621,7 @@ void MqttClient::mqtt2ros(mqtt::const_message_ptr mqtt_msg,
621621
if (mqtt2ros.stamped) {
622622

623623
// create ROS message buffer on top of MQTT message payload
624-
char* non_const_payload = const_cast<char*>(&payload[1]);
624+
char* non_const_payload = const_cast<char*>(&payload[msg_offset]);
625625
uint8_t* stamp_buffer = reinterpret_cast<uint8_t*>(non_const_payload);
626626

627627
// deserialize stamp

0 commit comments

Comments
 (0)