additional safety check

This commit is contained in:
Robin Müller 2022-08-29 12:01:44 +02:00
parent 2a75440b32
commit 9a590a3fcd
No known key found for this signature in database
GPG Key ID: 11D4952C8CCEF814

View File

@ -581,10 +581,12 @@ inline ReturnValue_t Service11TelecommandScheduling<MAX_NUM_TCS>::getMapFilterFr
}
// additional security check, this should never be true
if (itBegin->first > itEnd->first) {
if ((itBegin != telecommandMap.end() and itEnd != telecommandMap.end()) and
(itBegin->first > itEnd->first)) {
#if FSFW_CPP_OSTREAM_ENABLED == 1
sif::error << "11::getMapFilterFromData: itBegin > itEnd\n" << std::endl;
#else
sif::printError("11::GetMapFilterFromData: itBegin > itEnd\n");
sif::printError("11::getMapFilterFromData: itBegin > itEnd\n");
#endif
return returnvalue::FAILED;
}