summaryrefslogtreecommitdiff
path: root/sc/source/core/tool/interpr4.cxx
diff options
context:
space:
mode:
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);