From a6032ff5418ad66cc8fec10c636e32b124ee7864 Mon Sep 17 00:00:00 2001 From: Eike Rathke Date: Thu, 11 Oct 2018 00:57:00 +0200 Subject: 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 Tested-by: Jenkins --- sc/source/core/tool/interpr4.cxx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'sc/source/core/tool/interpr4.cxx') 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); -- cgit v1.2.3