Skip to content

Commit 9def34b

Browse files
committed
Segmentation fault removed
1 parent 3c12c6e commit 9def34b

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

test/test_server.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -45,15 +45,15 @@ class FibonacciServer
4545

4646
void executeCB(const behaviortree_ros::FibonacciGoalConstPtr &goal)
4747
{
48-
// publish info to the console for the user
49-
ROS_INFO("%s: Executing, creating fibonacci sequence of order %i with seeds %i, %i",
50-
action_name_.c_str(), goal->order, feedback_.sequence[0], feedback_.sequence[1]);
51-
5248
// calculate the result
5349
// push_back the seeds for the fibonacci sequence
5450
feedback_.sequence.clear();
5551
feedback_.sequence.push_back(0);
5652
feedback_.sequence.push_back(1);
53+
// publish info to the console for the user
54+
ROS_INFO("%s: Executing, creating fibonacci sequence of order %i with seeds %i, %i",
55+
action_name_.c_str(), goal->order, feedback_.sequence[0], feedback_.sequence[1]);
56+
5757
for(int i=1; i<=goal->order; i++)
5858
{
5959
feedback_.sequence.push_back(feedback_.sequence[i] + feedback_.sequence[i-1]);

0 commit comments

Comments
 (0)