mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-15 19:29:09 +02:00
* Fix formatfloat in case E not followed by +/- (bug id 35297)
git-svn-id: trunk@41803 -
This commit is contained in:
parent
ee177eab1f
commit
1951aff5a4
@ -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);
|
||||||
|
Loading…
Reference in New Issue
Block a user