fix array index out of bounds crash in EmulatorWindow::ProcessControllerHotkey
This commit is contained in:
parent
1319ff6ead
commit
85a93029a7
|
@ -1304,8 +1304,9 @@ EmulatorWindow::ControllerHotKey EmulatorWindow::ProcessControllerHotkey(
|
|||
break;
|
||||
}
|
||||
|
||||
if (button_combination.function == ButtonFunctions::IncTitleSelect ||
|
||||
button_combination.function == ButtonFunctions::DecTitleSelect) {
|
||||
if ((button_combination.function == ButtonFunctions::IncTitleSelect ||
|
||||
button_combination.function == ButtonFunctions::DecTitleSelect) &&
|
||||
recently_launched_titles_.size() > 0) {
|
||||
selected_title_index = std::clamp(
|
||||
selected_title_index, 0, (int)recently_launched_titles_.size() - 1);
|
||||
|
||||
|
|
Loading…
Reference in New Issue