File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -475,14 +475,14 @@ void InputVibrationBindingWidget::onClicked()
475475
476476 for (QString motor : input_setting_options)
477477 {
478- SmallStringBase motor_ui ( motor.toStdString ()) ;
478+ SmallString motor_ui{std::string_view{ motor.toStdString ()}} ;
479479 InputManager::PrettifyInputBinding (motor_ui, false );
480480 input_ui_options.push_back (QString (motor_ui));
481481 }
482482
483483 if (!current.isEmpty () && input_ui_options.indexOf (current) < 0 )
484484 {
485- input_setting_options .append (current);
485+ input_ui_options .append (current);
486486 }
487487 else if (input_setting_options.isEmpty ())
488488 {
@@ -503,8 +503,8 @@ void InputVibrationBindingWidget::onClicked()
503503
504504 // If a controller is unplugged, we won't have the setting string to save
505505 // Skip saving if selected is an existing bind from an unplugged controller
506- const int selected = input_setting_options .indexOf (input_dialog.textValue ());
507- if (selected >= 0 )
506+ const int selected = input_ui_options .indexOf (input_dialog.textValue ());
507+ if (selected >= 0 && selected < input_setting_options. size () )
508508 {
509509 // Update config
510510 const std::string new_setting_value (input_setting_options[selected].toStdString ());
You can’t perform that action at this time.
0 commit comments