1
0
Fork 0

(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.

release/0.7
rubidium 2009-01-07 08:26:09 +00:00
parent 1ada1a4ff2
commit 9888afd6d0
1 changed files with 1 additions and 0 deletions

View File

@ -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;