mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-08-01 00:36:43 +01:00
(svn r14885) -Fix: if settings minimum != 1 and 0-is-disabled is enabled, one could set the setting in-game to an out-of-valid-range value.
This commit is contained in:
parent
1ada1a4ff2
commit
9888afd6d0
@ -923,6 +923,7 @@ struct PatchesSelectionWindow : Window {
|
||||
if (x >= 10) {
|
||||
value += step;
|
||||
if (value > sdb->max) value = sdb->max;
|
||||
if (value < sdb->min) value = sdb->min; // skip between "disabled" and minimum
|
||||
} else {
|
||||
value -= step;
|
||||
if (value < sdb->min) value = (sdb->flags & SGF_0ISDISABLED) ? 0 : sdb->min;
|
||||
|
Loading…
Reference in New Issue
Block a user