mirror of
https://github.com/JGRennison/OpenTTD-patches.git
synced 2024-11-09 19:10:38 +00: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
a1d3c90af9
commit
ac0e2e6d5a
@ -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