summaryrefslogtreecommitdiff
path: root/sc/source/core/tool
diff options
context:
space:
mode:
authorJulien Nabet <serval2412@yahoo.fr>2014-06-05 07:28:32 +0200
committerCaolán McNamara <caolanm@redhat.com>2014-06-05 08:27:02 +0000
commita9adf83582069308f7f98c5049256ea5e81c7c68 (patch)
tree52253155826af1d51ec97144378b599980e4c957 /sc/source/core/tool
parent743bcdebef21deeb73f0111b4e6e047c88fd7b8f (diff)
Resolves fdo#75971 Crash when invoking "Insert > Names > Create"
Cherry-pick 37d7d115dd346ba7a713a5a18d90fc48a0d35072 + 4f24e3d480bb88a568de10b4d81116766b136c91 Change-Id: Ieb3af12e120cd8f17ee659406d7d0e46f05fba7d Reviewed-on: https://gerrit.libreoffice.org/9645 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'sc/source/core/tool')
-rw-r--r--sc/source/core/tool/interpr1.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/sc/source/core/tool/interpr1.cxx b/sc/source/core/tool/interpr1.cxx
index b5510f665714..c4e6c56224b1 100644
--- a/sc/source/core/tool/interpr1.cxx
+++ b/sc/source/core/tool/interpr1.cxx
@@ -7801,7 +7801,7 @@ void ScInterpreter::ScLeft()
if (nParamCount == 2)
{
double nVal = ::rtl::math::approxFloor(GetDouble());
- if ( nVal < 0.0 || nVal > STRING_MAXLEN )
+ if ( rtl::math::isNan(nVal) || nVal < 0.0 || nVal > STRING_MAXLEN )
{
PushIllegalArgument();
return ;
@@ -7909,7 +7909,7 @@ void ScInterpreter::ScRightB()
if (nParamCount == 2)
{
double nVal = ::rtl::math::approxFloor(GetDouble());
- if ( nVal < 0.0 || nVal > STRING_MAXLEN )
+ if ( rtl::math::isNan(nVal) || nVal < 0.0 || nVal > STRING_MAXLEN )
{
PushIllegalArgument();
return ;