]> git.mxchange.org Git - flightgear.git/blobdiff - src/Autopilot/autopilot.cxx
Fix bug 191, uninitialised HUD color.
[flightgear.git] / src / Autopilot / autopilot.cxx
index 809001d617bd4e32fa014cc1887cc93b4c74e826..e8bb91b02bc857bf090267e962e67e2dc8d8f135 100644 (file)
@@ -97,11 +97,11 @@ void Autopilot::add_component( Component * component )
   std::string name = component->get_name();
   for( unsigned i = 0; get_subsystem( name.c_str() ) != NULL; i++ ) {
       ostringstream buf;
-      buf <<  name << "_" << i;
+      buf <<  component->get_name() << "_" << i;
       name = buf.str();
   }
   if( name != component->get_name() )
-    SG_LOG( SG_ALL, SG_ALERT, "Duplicate autopilot component " << component->get_name() << ", renamed to " << name );
+    SG_LOG( SG_ALL, SG_WARN, "Duplicate autopilot component " << component->get_name() << ", renamed to " << name );
 
   set_subsystem( name.c_str(), component );
 }