Skip to content

Commit 4d991c6

Browse files
mergify[bot]JayHerpin
authored andcommitted
Fixed crash due to incorrect string construction (ros-navigation#5606) (ros-navigation#5613)
(cherry picked from commit 48e7e06) Signed-off-by: Jay Herpin <[email protected]> Co-authored-by: Jay Herpin <[email protected]>
1 parent f2eb1b6 commit 4d991c6

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

nav2_behavior_tree/include/nav2_behavior_tree/bt_service_node.hpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -85,9 +85,8 @@ class BtServiceNode : public BT::ActionNodeBase
8585
node_->get_logger(), "\"%s\" service server not available after waiting for %.2fs",
8686
service_name_.c_str(), wait_for_service_timeout_.count() / 1000.0);
8787
throw std::runtime_error(
88-
std::string(
89-
"Service server %s not available",
90-
service_name_.c_str()));
88+
std::string("Service server ") + service_name_ +
89+
std::string(" not available"));
9190
}
9291

9392
RCLCPP_DEBUG(

0 commit comments

Comments
 (0)