diff options
author | Eike Rathke <erack@redhat.com> | 2016-07-25 13:32:17 +0200 |
---|---|---|
committer | Eike Rathke <erack@redhat.com> | 2016-07-25 13:45:14 +0200 |
commit | fb2c146752074b132d665e40343a08dcb2e6672e (patch) | |
tree | 92608efbdbc95ab5c54c5bcb0ccd8930448063e2 /sc | |
parent | 98c90acdfc9813ad8789974df1705e0a240194fd (diff) |
use div() instead of /0 to content ubsan
While we do handle double floating point division by 0 at least on
IEEE754 systems, ubsan builds mock about.
Change-Id: Ifff40fb917c6fb1cd6b7c812bc002c448b578f38
Diffstat (limited to 'sc')
-rw-r--r-- | sc/source/core/tool/interpr1.cxx | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sc/source/core/tool/interpr1.cxx b/sc/source/core/tool/interpr1.cxx index 156da0f9b12e..dbbc55e0a759 100644 --- a/sc/source/core/tool/interpr1.cxx +++ b/sc/source/core/tool/interpr1.cxx @@ -1695,7 +1695,7 @@ void ScInterpreter::ScTan() void ScInterpreter::ScCot() { - PushDouble(1.0 / ::rtl::math::tan(GetDouble())); + PushDouble( div( 1.0, ::rtl::math::tan(GetDouble()))); } void ScInterpreter::ScArcSin() |