1
0
Fork 0

Errormessage for Sched time parse error

This commit is contained in:
portree_kid 2021-02-16 21:37:18 +01:00 committed by James Turner
parent 8493e0bbd2
commit fcb7cf86c6

View file

@ -184,6 +184,10 @@ time_t FGScheduledFlight::processTimeString(const string& theTime)
timeOffsetInDays = 0;
}
// TODO: verify status of each token.
if (timeCopy.length() < 8) {
SG_LOG( SG_AI, SG_WARN, "Timestring too short. " << theTime << " Defaulted to now" );
return currTimeDate->get_cur_time();
}
targetHour = atoi(timeCopy.substr(0,2).c_str());
targetMinute = atoi(timeCopy.substr(3,5).c_str());
targetSecond = atoi(timeCopy.substr(6,8).c_str());