diff options
author | rubidium <rubidium@openttd.org> | 2009-01-07 08:26:09 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2009-01-07 08:26:09 +0000 |
commit | 9888afd6d08db5b067d5b50ffedaeb587ea896aa (patch) | |
tree | cf8420cd312f57b3c8cd828a1d5adfd2a665d644 | |
parent | 1ada1a4ff21c1dcada68540ba9650d33503b8507 (diff) | |
download | openttd-9888afd6d08db5b067d5b50ffedaeb587ea896aa.tar.xz |
(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.
-rw-r--r-- | src/settings_gui.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/settings_gui.cpp b/src/settings_gui.cpp index 3020aaba0..30bad8889 100644 --- a/src/settings_gui.cpp +++ b/src/settings_gui.cpp @@ -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; |