From d689407c6fce3f995cc763c77d704bffd1cf9a04 Mon Sep 17 00:00:00 2001 From: lazarus-bart Date: Mon, 17 Aug 2020 20:15:42 +0000 Subject: [PATCH] ExCtrls: use Abs() of LValue, not of AValue in TCustomFloatSISpinEditEx.ValueToStr git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@7612 8e941d3f-bd1b-0410-a28a-d453659cc2b4 --- components/exctrls/source/exeditctrls.pas | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/components/exctrls/source/exeditctrls.pas b/components/exctrls/source/exeditctrls.pas index ab1a8c8d7..7439571f2 100644 --- a/components/exctrls/source/exeditctrls.pas +++ b/components/exctrls/source/exeditctrls.pas @@ -559,14 +559,15 @@ end; function TCustomFloatSISpinEditEx.ValueToStr(const AValue: Double): String; var Prefix: TSIPrefix; - LValue, Factor: Double; + LValue, AbsLValue, Factor: Double; fs: TFormatSettings; begin LValue := GetLimitedValue(AValue); + AbsLValue := Abs(LValue); for Prefix := Low(SIFactors) to High(SIFactors) do begin Factor := SIFactors[Prefix]; - if (abs(AValue) >= Factor) then + if (AbsLValue >= Factor) then begin {$IF LCL_FullVersion < 2010000} fs := DefaultFormatSettings;