diff --git a/components/fpexif/fpeexifdata.pas b/components/fpexif/fpeexifdata.pas index d62e23531..523a29b4e 100644 --- a/components/fpexif/fpeexifdata.pas +++ b/components/fpexif/fpeexifdata.pas @@ -1510,10 +1510,11 @@ var p: Integer; begin floatVal := GetAsFloat; + if IsNaN(floatVal) or (floatVal = 0) then + Result := '' + else if FFormatStr = '' then begin - if IsNaN(floatVal) then - Result := '' - else if floatVal >= 10 then + if floatVal >= 10 then Result := Format('%.0fs', [floatVal]) else if floatVal >= 1 then Result := Format('%.1fs', [floatVal])