[Libreoffice-commits] core.git: emfio/source
Caolán McNamara (via logerrit)
logerrit at kemper.freedesktop.org
Fri Feb 26 10:34:14 UTC 2021
emfio/source/reader/mtftools.cxx | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
New commits:
commit da457f41f8f0a14014ff9f122467f3a26eb1ac20
Author: Caolán McNamara <caolanm at redhat.com>
AuthorDate: Thu Feb 25 15:06:50 2021 +0000
Commit: Caolán McNamara <caolanm at redhat.com>
CommitDate: Fri Feb 26 11:33:33 2021 +0100
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 at redhat.com>
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);
More information about the Libreoffice-commits
mailing list