Skip to content

Commit c000bf7

Browse files
authored
Merge pull request #36 from ika-rwth-aachen/fix/ros1-latencies
Fix bug in ros1 latency deserialization
2 parents 207a618 + 5c369f0 commit c000bf7

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)