Skip to content

Commit

Permalink
Fixed moved from object access.
Browse files Browse the repository at this point in the history
  • Loading branch information
redboltz committed Sep 16, 2021
1 parent 11d26fa commit 657bc6f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions include/mqtt/v5_message.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -981,11 +981,11 @@ class basic_publish_message {
auto prev_topic_name_size = get_size(topic_name_);
topic_name_ = force_move(topic_name);
topic_name_length_buf_ = boost::container::static_vector<char, 2>{
num_to_2bytes(boost::numeric_cast<std::uint16_t>(get_size(topic_name)))
num_to_2bytes(boost::numeric_cast<std::uint16_t>(get_size(topic_name_)))
};

remaining_length_buf_.clear();
remaining_length_ = remaining_length_ - prev_topic_name_size + get_size(topic_name);
remaining_length_ = remaining_length_ - prev_topic_name_size + get_size(topic_name_);
auto rb = remaining_bytes(remaining_length_);
for (auto e : rb) {
remaining_length_buf_.push_back(e);
Expand Down

0 comments on commit 657bc6f

Please sign in to comment.