[Companion] Ensure proper number of model slots after radio data conversion.

This commit is contained in:
Max Paperno
2017-12-10 06:10:26 -05:00
parent 204711d313
commit cffb5e767f
+5
View File
@@ -307,4 +307,9 @@ void RadioData::convert(Board::Type before, Board::Type after)
if (IS_HORUS(after)) {
fixModelFilenames();
}
// ensure proper number of model slots
if (getCurrentFirmware()->getCapability(Models) && getCurrentFirmware()->getCapability(Models) != (int)models.size()) {
models.resize(getCurrentFirmware()->getCapability(Models));
}
}