tools/source/generic/fract.cxx | 4 ++++ 1 file changed, 4 insertions(+)
New commits: commit f9877e1e9abd10bb5bfcae00269c743ca6e62c60 Author: Caolán McNamara <caol...@redhat.com> AuthorDate: Sat Oct 5 19:15:46 2019 +0100 Commit: Caolán McNamara <caol...@redhat.com> CommitDate: Sat Oct 5 21:29:38 2019 +0200 ofz#17212 Floating point exception deploy a workaround, bug logged against boost as: https://github.com/boostorg/boost/issues/335 Change-Id: I9791133e926dd474ddc5960a33fd90592ce3dcb3 Reviewed-on: https://gerrit.libreoffice.org/80304 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caol...@redhat.com> Tested-by: Caolán McNamara <caol...@redhat.com> diff --git a/tools/source/generic/fract.cxx b/tools/source/generic/fract.cxx index 3a8eb09822c8..8ec17b94a477 100644 --- a/tools/source/generic/fract.cxx +++ b/tools/source/generic/fract.cxx @@ -104,6 +104,10 @@ Fraction::operator double() const return 0.0; } + // https://github.com/boostorg/boost/issues/335 when these are std::numeric_limits<sal_Int32>::min + if (mnNumerator == mnDenominator) + return 1.0; + return boost::rational_cast<double>(toRational(mnNumerator, mnDenominator)); } _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits