From 9141c50a2c033e07dd1e3d8a93020b760d8cdb88 Mon Sep 17 00:00:00 2001 From: michael Date: Sat, 21 Mar 2020 14:39:56 +0000 Subject: [PATCH] * Fix bug in FormatFloat: missing thousand sep when no decimal separator present. Patch by Bruno Fierens --- packages/rtl/sysutils.pas | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packages/rtl/sysutils.pas b/packages/rtl/sysutils.pas index a4c78a2..27a0598 100644 --- a/packages/rtl/sysutils.pas +++ b/packages/rtl/sysutils.pas @@ -1633,6 +1633,8 @@ Begin if (Result<>'') and (Result[1]=' ') then Delete(Result,1,1); P:=Pos('.',Result); + if (P<=0) then + P:=Length(Result)+1; Result:=ReplaceDecimalSep(Result,DS); Dec(P,3); if (TS<>'') and (TS<>#0) then