Skip to content

Commit 48e7e06

Browse files
authored
Fixed crash due to incorrect string construction (#5606)
Signed-off-by: Jay Herpin <jherpin@metalsharkboats.com>
1 parent 7d37466 commit 48e7e06

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
@@ -69,9 +69,8 @@ class BtServiceNode : public BT::ActionNodeBase
6969
node_->get_logger(), "\"%s\" service server not available after waiting for %.2fs",
7070
service_name_.c_str(), wait_for_service_timeout_.count() / 1000.0);
7171
throw std::runtime_error(
72-
std::string(
73-
"Service server %s not available",
74-
service_name_.c_str()));
72+
std::string("Service server ") + service_name_ +
73+
std::string(" not available"));
7574
}
7675

7776
RCLCPP_DEBUG(

0 commit comments

Comments
 (0)