Fixed: Crash when opening menu at too small size

This commit is contained in:
aristocratos 2021-09-24 20:58:58 +02:00
parent 78c417bc9f
commit 37de9464e1

View file

@ -1341,11 +1341,11 @@ namespace Menu {
menuMask.reset();
menuMask.set(SizeError);
}
else {
for (const auto& i : iota(0, (int)menuMask.size())) {
if (menuMask.test(i)) currentMenu = i;
}
for (const auto& i : iota(0, (int)menuMask.size())) {
if (menuMask.test(i)) currentMenu = i;
}
}
auto retCode = menuFunc.at(currentMenu)(key);