2
0
Эх сурвалжийг харах

* Fix bug in FormatFloat: missing thousand sep when no decimal separator present. Patch by Bruno Fierens

michael 5 жил өмнө
parent
commit
9141c50a2c

+ 2 - 0
packages/rtl/sysutils.pas

@@ -1633,6 +1633,8 @@ Begin
   if (Result<>'') and (Result[1]=' ') then
   if (Result<>'') and (Result[1]=' ') then
     Delete(Result,1,1);
     Delete(Result,1,1);
   P:=Pos('.',Result);
   P:=Pos('.',Result);
+  if (P<=0) then
+    P:=Length(Result)+1;
   Result:=ReplaceDecimalSep(Result,DS);
   Result:=ReplaceDecimalSep(Result,DS);
   Dec(P,3);
   Dec(P,3);
   if (TS<>'') and (TS<>#0) then
   if (TS<>'') and (TS<>#0) then