summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEike Rathke <erack@redhat.com>2017-12-19 16:28:04 +0100
committerEike Rathke <erack@redhat.com>2017-12-19 16:31:33 +0100
commit4b444b4c1efc2be219e6975e30048ff616fdac0f (patch)
treec0830ca29a307838bd24ee50f06c678a556c02eb
parent2139fd8761e44b87e6d775d6de8361155dc3eaf1 (diff)
Resolves: tdf#114539 only pop own parameters from stack
... and not another pending one.. Change-Id: Ief5c27ccfb0b4121f2ba019e0fb8770dabbf60cf
-rw-r--r--sc/source/core/tool/interpr6.cxx3
1 files changed, 2 insertions, 1 deletions
diff --git a/sc/source/core/tool/interpr6.cxx b/sc/source/core/tool/interpr6.cxx
index 04a664831c9f..62c96376c664 100644
--- a/sc/source/core/tool/interpr6.cxx
+++ b/sc/source/core/tool/interpr6.cxx
@@ -1070,10 +1070,11 @@ void ScInterpreter::ScRawSubtract()
// Obtain the minuend.
double fRes = GetDouble();
- while (nGlobalError == FormulaError::NONE && nParamCount-- > 1)
+ while (nGlobalError == FormulaError::NONE && nParamCount > 1)
{
// Simple single values without matrix support.
fRes -= GetDouble();
+ --nParamCount;
}
while (nParamCount-- > 0)
PopError();