summaryrefslogtreecommitdiff
path: root/sc/source/core/tool/interpr4.cxx
diff options
context:
space:
mode:
authorEike Rathke <erack@redhat.com>2018-10-11 00:57:00 +0200
committerEike Rathke <erack@redhat.com>2018-10-11 11:26:37 +0200
commita6032ff5418ad66cc8fec10c636e32b124ee7864 (patch)
treef6d41d15ab98824487a3ebef5df5b6dd3389b3c5 /sc/source/core/tool/interpr4.cxx
parent79bc165b6c906aa4f9efa6f4cdebb2f8a5f405b1 (diff)
Resolves: tdf#90698 catch list (1;2) of non-references as error
Change-Id: Icc6f93bbf85df245ba332ce89791a1c8d266b1c6 Reviewed-on: https://gerrit.libreoffice.org/61639 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Jenkins
Diffstat (limited to 'sc/source/core/tool/interpr4.cxx')
-rw-r--r--sc/source/core/tool/interpr4.cxx4
1 files changed, 3 insertions, 1 deletions
diff --git a/sc/source/core/tool/interpr4.cxx b/sc/source/core/tool/interpr4.cxx
index 4b5ff2281bfa..c47b33f8488c 100644
--- a/sc/source/core/tool/interpr4.cxx
+++ b/sc/source/core/tool/interpr4.cxx
@@ -4507,7 +4507,7 @@ StackVar ScInterpreter::Interpret()
bForcedResultType = false;
}
- if( sp )
+ if (sp == 1)
{
pCur = pStack[ sp-1 ];
if( pCur->GetOpCode() == ocPush )
@@ -4634,6 +4634,8 @@ StackVar ScInterpreter::Interpret()
else
SetError( FormulaError::UnknownStackVariable);
}
+ else if (sp > 1)
+ SetError( FormulaError::OperatorExpected);
else
SetError( FormulaError::NoCode);