mirror of
https://github.com/libretro/scummvm.git
synced 2024-12-14 21:59:17 +00:00
SDL: Fix value range checking for kbdMouseSpeedSlider
This commit is contained in:
parent
afff429261
commit
5934c05bca
@ -243,7 +243,7 @@ void OptionsDialog::build() {
|
||||
if (g_system->hasFeature(OSystem::kFeatureKbdMouseSpeed)) {
|
||||
if (ConfMan.hasKey("kbdmouse_speed", _domain)) {
|
||||
int value = ConfMan.getInt("kbdmouse_speed", _domain);
|
||||
if (_kbdMouseSpeedSlider && value < sizeof(kbdMouseSpeedLabels)) {
|
||||
if (_kbdMouseSpeedSlider && value < ARRAYSIZE(kbdMouseSpeedLabels) - 1 && value >= 0) {
|
||||
_kbdMouseSpeedSlider->setValue(value);
|
||||
_kbdMouseSpeedLabel->setLabel(_(kbdMouseSpeedLabels[value]));
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user