Explorar o código

rtl: fix FormatFloat to skip first spaces

git-svn-id: trunk@14490 -
paul %!s(int64=15) %!d(string=hai) anos
pai
achega
5cc182ac07
Modificáronse 1 ficheiros con 5 adicións e 2 borrados
  1. 5 2
      rtl/objpas/sysutils/sysstr.inc

+ 5 - 2
rtl/objpas/sysutils/sysstr.inc

@@ -2203,8 +2203,11 @@ Var
                 { Everything unexpected is written before the first digit }
                 { Everything unexpected is written before the first digit }
                 For N := 1 To UnexpectedDigits Do
                 For N := 1 To UnexpectedDigits Do
                   Begin
                   Begin
-                  Buf[0] := Digits[N];
-                  Inc(Buf);
+                    if (Digits[N]<>' ') Then
+                    begin
+                      Buf[0] := Digits[N];
+                      Inc(Buf);
+                    end;
                   If thousand And (Digits[N]<>'-') Then
                   If thousand And (Digits[N]<>'-') Then
                     Begin
                     Begin
                     If (DigitExponent Mod 3 = 0) And (DigitExponent>0) Then
                     If (DigitExponent Mod 3 = 0) And (DigitExponent>0) Then