* Fix formatfloat in case E not followed by +/- (bug id 35297)

git-svn-id: trunk@41803 -
This commit is contained in:
michael 2019-03-30 15:47:50 +00:00
parent ee177eab1f
commit 1951aff5a4

View File

@ -369,18 +369,21 @@ begin
'e', 'E':
begin
ToResult(C); // Always needed
Inc(I);
if I<=Section.Length then
if IsScientific then
begin
C:=Section[I];
if (C in ['+','-']) then
Inc(I);
if I<=Section.Length then
begin
AddToResult(FormatExponent(C,FV.Exponent-DecimalPos+1));
// Skip rest
while (I<SectionLength) and (Section[i+1]='0') do
Inc(I);
C:=Section[I];
if (C in ['+','-']) then
begin
AddToResult(FormatExponent(C,FV.Exponent-DecimalPos+1));
// Skip rest
while (I<SectionLength) and (Section[i+1]='0') do
Inc(I);
end;
end;
end;
end;
end;
else
ToResult(C);