Errormessage for Sched time parse error
This commit is contained in:
parent
8493e0bbd2
commit
fcb7cf86c6
1 changed files with 4 additions and 0 deletions
|
@ -184,6 +184,10 @@ time_t FGScheduledFlight::processTimeString(const string& theTime)
|
||||||
timeOffsetInDays = 0;
|
timeOffsetInDays = 0;
|
||||||
}
|
}
|
||||||
// TODO: verify status of each token.
|
// 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());
|
targetHour = atoi(timeCopy.substr(0,2).c_str());
|
||||||
targetMinute = atoi(timeCopy.substr(3,5).c_str());
|
targetMinute = atoi(timeCopy.substr(3,5).c_str());
|
||||||
targetSecond = atoi(timeCopy.substr(6,8).c_str());
|
targetSecond = atoi(timeCopy.substr(6,8).c_str());
|
||||||
|
|
Loading…
Reference in a new issue