mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-22 04:29:29 +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':
|
||||
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);
|
||||
|
Loading…
Reference in New Issue
Block a user