(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:
rubidium 2009-01-07 08:26:09 +00:00
parent a1d3c90af9
commit ac0e2e6d5a

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;