emfio/source/reader/mtftools.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
New commits: commit da457f41f8f0a14014ff9f122467f3a26eb1ac20 Author: Caolán McNamara <[email protected]> AuthorDate: Thu Feb 25 15:06:50 2021 +0000 Commit: Caolán McNamara <[email protected]> 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 <[email protected]> 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); _______________________________________________ Libreoffice-commits mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
