From a45890443b9b2a0ad5fd32627a788d47a447ff37 Mon Sep 17 00:00:00 2001 From: michael Date: Sat, 4 Oct 2014 15:59:37 +0000 Subject: [PATCH] * Fix for regression in 12385 git-svn-id: trunk@28741 - --- rtl/objpas/sysutils/sysstr.inc | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/rtl/objpas/sysutils/sysstr.inc b/rtl/objpas/sysutils/sysstr.inc index a95cfe2810..9fa1aa9cab 100644 --- a/rtl/objpas/sysutils/sysstr.inc +++ b/rtl/objpas/sysutils/sysstr.inc @@ -1905,6 +1905,7 @@ Var UnexpectedDigits: Integer; { Number Of unexpected Digits that } { have To be inserted before the } { First placeholder. } + UnexpectedDigitsStart: Integer; { Location in Digits where first unexpected Digit is located } DigitExponent: Integer; { Exponent Of First digit In } { Digits Array. } @@ -2296,7 +2297,7 @@ Var Buf[0] := Digits[N]; Inc(Buf); end; - If thousand And (Digits[N]<>'-') Then + If thousand And (Not (Digits[N] in [' ','-'])) Then Begin If (DigitExponent Mod 3 = 0) And (DigitExponent>0) Then Begin @@ -2321,8 +2322,9 @@ Var Inc(Buf); End; End; + if Digits[Dig]<>'-' then + Dec(DigitExponent); Inc(Dig); - Dec(DigitExponent); Inc(Fmt); End; 'e', 'E':