bugfix/ai-static-analysis #82

Merged
localhorst merged 33 commits from bugfix/ai-static-analysis into master 2025-12-10 21:52:17 +01:00
7 changed files with 137 additions and 104 deletions
Showing only changes of commit f9d63a6a3f - Show all commits

View File

@ -92,16 +92,19 @@ void reHDD::app_logic(void)
Drive *reHDD::getSelectedDrive()
{
mxDrives.lock();
if (u16SelectedEntry < listDrives.size())
{
list<Drive>::iterator it = listDrives.begin();
advance(it, u16SelectedEntry);
it->u16DriveIndex = u16SelectedEntry;
mxDrives.unlock();
return &(*it);
}
else
{
Logger::logThis()->warning("selected drive not present");
mxDrives.unlock();
return nullptr;
}
}