summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2014-07-25 10:59:34 +0100
committerCaolán McNamara <caolanm@redhat.com>2014-07-25 11:46:53 +0100
commit32162d327bc4356bc69ee4c8e82f0dbc3c8e3076 (patch)
tree9bbd0e12d70a71c164b8eded6087e0a04a4aa4b3
parentc9b419b17756684793645a67b052f074cfefe801 (diff)
coverity#735613 Division or modulo by float zero
Change-Id: Ib441ec962abb9f87ca27ea5300f23a0515d3db2b
-rw-r--r--sc/source/core/tool/interpr1.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/sc/source/core/tool/interpr1.cxx b/sc/source/core/tool/interpr1.cxx
index 544f173ea558..61587a1c7932 100644
--- a/sc/source/core/tool/interpr1.cxx
+++ b/sc/source/core/tool/interpr1.cxx
@@ -6820,7 +6820,7 @@ void ScInterpreter::DBIterator( ScIterFunc eFunc )
{
case ifCOUNT: nErg = nCount; break;
case ifSUM: nErg = ::rtl::math::approxAdd( nErg, fMem ); break;
- case ifAVERAGE: nErg = ::rtl::math::approxAdd( nErg, fMem ) / nCount; break;
+ case ifAVERAGE: nErg = div(::rtl::math::approxAdd(nErg, fMem), nCount); break;
default: ; // nothing
}
PushDouble( nErg );