diff options
author | Caolán McNamara <caolanm@redhat.com> | 2021-02-25 15:06:50 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2021-02-26 11:33:33 +0100 |
commit | da457f41f8f0a14014ff9f122467f3a26eb1ac20 (patch) | |
tree | 47b5ee6cfb4f220afac9c182d89f75dd0e910dbf | |
parent | 8994ae0dd27ddafed63d3edef82237158ff24d77 (diff) |
ofz#31370 Divide-by-zero
Change-Id: If581d61b678616f8a80f8ad2d2dea5ecbf10d8fc
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111557
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
-rw-r--r-- | emfio/source/reader/mtftools.cxx | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/emfio/source/reader/mtftools.cxx b/emfio/source/reader/mtftools.cxx index 7ea5b7969c52..29b31438b399 100644 --- a/emfio/source/reader/mtftools.cxx +++ b/emfio/source/reader/mtftools.cxx @@ -389,7 +389,7 @@ namespace emfio const tools::Long nMeasuredTextLength(pTempVirtualDevice->GetTextWidth(rText)); // compare expected and imported TextLengths - if(nImportedTextLength != nMeasuredTextLength) + if (nImportedTextLength != nMeasuredTextLength && nMeasuredTextLength) { const double fFactorText(static_cast<double>(nImportedTextLength) / static_cast<double>(nMeasuredTextLength)); const double fFactorTextPercent(fabs(1.0 - fFactorText) * 100.0); |