fpexif: Fix potential divide-by-zero error in TExposureTimeTag.GetAsString (https://forum.lazarus.freepascal.org/index.php/topic,44015.msg379681.html#msg379681).
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@7779 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
parent
660f4a7db7
commit
f25070ba4f
@ -1510,10 +1510,11 @@ var
|
|||||||
p: Integer;
|
p: Integer;
|
||||||
begin
|
begin
|
||||||
floatVal := GetAsFloat;
|
floatVal := GetAsFloat;
|
||||||
if FFormatStr = '' then begin
|
if IsNaN(floatVal) or (floatVal = 0) then
|
||||||
if IsNaN(floatVal) then
|
|
||||||
Result := ''
|
Result := ''
|
||||||
else if floatVal >= 10 then
|
else
|
||||||
|
if FFormatStr = '' then begin
|
||||||
|
if floatVal >= 10 then
|
||||||
Result := Format('%.0fs', [floatVal])
|
Result := Format('%.0fs', [floatVal])
|
||||||
else if floatVal >= 1 then
|
else if floatVal >= 1 then
|
||||||
Result := Format('%.1fs', [floatVal])
|
Result := Format('%.1fs', [floatVal])
|
||||||
|
Loading…
Reference in New Issue
Block a user