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