Merge pull request #162 from gmriggs/canary_experimental
fix array index out of bounds crash in EmulatorWindow::ProcessControllerHotkey
This commit is contained in:
commit
ad2d27f6dc
|
@ -1304,8 +1304,9 @@ EmulatorWindow::ControllerHotKey EmulatorWindow::ProcessControllerHotkey(
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (button_combination.function == ButtonFunctions::IncTitleSelect ||
|
if ((button_combination.function == ButtonFunctions::IncTitleSelect ||
|
||||||
button_combination.function == ButtonFunctions::DecTitleSelect) {
|
button_combination.function == ButtonFunctions::DecTitleSelect) &&
|
||||||
|
recently_launched_titles_.size() > 0) {
|
||||||
selected_title_index = std::clamp(
|
selected_title_index = std::clamp(
|
||||||
selected_title_index, 0, (int)recently_launched_titles_.size() - 1);
|
selected_title_index, 0, (int)recently_launched_titles_.size() - 1);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue