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 );
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 {