[Libreoffice-commits] core.git: sc/source
Eike Rathke
erack at redhat.com
Wed Feb 11 06:02:40 PST 2015
sc/source/core/tool/interpr1.cxx | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
New commits:
commit 6583f4e30015164af4972921b5bb7880dfb65f65
Author: Eike Rathke <erack at redhat.com>
Date: Wed Feb 11 14:58:16 2015 +0100
tdf#88576 check that two parameters are given for IFERROR() and IFNA()
Otherwise the functions failed only for the error case resulting in
#NULL! error.
Change-Id: Ieb987637698ab418fc0a60cd873e23878c9f497b
diff --git a/sc/source/core/tool/interpr1.cxx b/sc/source/core/tool/interpr1.cxx
index 6ecf137..12f77a6 100644
--- a/sc/source/core/tool/interpr1.cxx
+++ b/sc/source/core/tool/interpr1.cxx
@@ -242,9 +242,11 @@ void ScInterpreter::ScIfError( bool bNAonly )
{
const short* pJump = pCur->GetJump();
short nJumpCount = pJump[ 0 ];
- if (!sp)
+ if (!sp || nJumpCount != 2)
{
- PushError( errUnknownStackVariable);
+ // Reset nGlobalError here to not propagate the old error, if any.
+ nGlobalError = (sp ? errParameterExpected : errUnknownStackVariable);
+ PushError( nGlobalError);
aCode.Jump( pJump[ nJumpCount ], pJump[ nJumpCount ] );
return;
}
More information about the Libreoffice-commits
mailing list