diff --git a/gazebo_ros/src/gazebo_ros_api_plugin.cpp b/gazebo_ros/src/gazebo_ros_api_plugin.cpp index 4e4a0b4d2..c3ec95972 100644 --- a/gazebo_ros/src/gazebo_ros_api_plugin.cpp +++ b/gazebo_ros/src/gazebo_ros_api_plugin.cpp @@ -577,7 +577,7 @@ bool GazeboRosApiPlugin::spawnURDFModel(gazebo_msgs::SpawnModel::Request &req, ROS_DEBUG_ONCE("Package name [%s] has path [%s]", package_name.c_str(), package_path.c_str()); model_xml.replace(pos1,(pos2-pos1),package_path); - pos1 = model_xml.find(package_prefix,0); + pos1 = model_xml.find(package_prefix, pos1); } } // ROS_DEBUG("Model XML\n\n%s\n\n ",model_xml.c_str());