[Libreoffice-commits] core.git: tools/source
Caolán McNamara (via logerrit)
logerrit at kemper.freedesktop.org
Sat Oct 5 19:30:36 UTC 2019
tools/source/generic/fract.cxx | 4 ++++
1 file changed, 4 insertions(+)
New commits:
commit f9877e1e9abd10bb5bfcae00269c743ca6e62c60
Author: Caolán McNamara <caolanm at redhat.com>
AuthorDate: Sat Oct 5 19:15:46 2019 +0100
Commit: Caolán McNamara <caolanm at 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 <caolanm at redhat.com>
Tested-by: Caolán McNamara <caolanm at 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));
}
More information about the Libreoffice-commits
mailing list