diff --git a/lcl/include/spinedit.inc b/lcl/include/spinedit.inc index a95c5801c2..8b632bb2f8 100644 --- a/lcl/include/spinedit.inc +++ b/lcl/include/spinedit.inc @@ -167,7 +167,9 @@ end; function TCustomFloatSpinEdit.GetLimitedValue(const AValue: Double): Double; begin Result := AValue; - if FMaxValue >= FMinValue then + //Delphi does not constrain when MinValue = MaxValue, and does if MaxValue > MinValue, + //but the latter makes absolutely no sense at all. + if FMaxValue > FMinValue then begin if Result < FMinValue then Result := FMinValue; if Result > FMaxValue then Result := FMaxValue;