]> git.mxchange.org Git - flightgear.git/blobdiff - src/Autopilot/auto_gui.cxx
Make sure that all elapsed time gets passed to update when a subsystem
[flightgear.git] / src / Autopilot / auto_gui.cxx
index 4aca7092e27d7e1524ec39c712d0bb21bde84759..1af3e523438866936722c10886f581bf76e53e68 100644 (file)
@@ -641,8 +641,7 @@ void TgtAptDialog_OK (puObject *)
          globals->get_autopilot()->set_HeadingEnabled( true );
          globals->get_autopilot()->set_HeadingMode( FGAutopilot::FG_HEADING_WAYPOINT );
 
-    } else if ( current_fixlist->query( TgtAptId, 0.0, 0.0, 0.0,
-                                       &f, &t1, &t2 ) )
+    } else if ( current_fixlist->query( TgtAptId, &f ) )
     {
         SG_LOG( SG_GENERAL, SG_INFO,
                 "Adding waypoint (fix) = " << TgtAptId );
@@ -723,7 +722,7 @@ void AddWayPoint(puObject *cb)
         WPList = new char* [ WPListsize + 1 ];
         for (i = 0; i < globals->get_route()->size(); i++ ) {
            sprintf(WPString, "%5s %3.2flon %3.2flat", globals->get_route()->get_waypoint(i).get_id().c_str(), globals->get_route()->get_waypoint(i).get_target_lon(), globals->get_route()->get_waypoint(i).get_target_lat());
-           WPList [i] = new char[ strlen(WPString) ];
+           WPList [i] = new char[ strlen(WPString)+1 ];
            strcpy ( WPList [i], WPString );
         }
     } else {