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

pull/155/head
rubidium 16 years ago
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…
Cancel
Save