Fix NaN for Limiting Rotation Rates #872

Merged
meggert merged 17 commits from limit-rot-rate-fix into main 2024-03-06 11:13:02 +01:00
Showing only changes of commit c2d8ef9fe4 - Show all commits

View File

@ -2102,9 +2102,8 @@ ReturnValue_t CoreController::initLeapSecondsFromFile() {
} }
iss >> nextWord; iss >> nextWord;
uint16_t leapSeconds = 0; uint16_t leapSeconds = 0;
size_t checkPtr; leapSeconds = std::stoi(nextWord.c_str());
leapSeconds = std::stoi(nextWord.c_str(), &checkPtr, 10); if (iss.bad()) {
if (iss.bad() or checkPtr) {
return returnvalue::FAILED; return returnvalue::FAILED;
} }
Clock::setLeapSeconds(leapSeconds); Clock::setLeapSeconds(leapSeconds);