summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorEike Rathke <erack@redhat.com>2017-12-19 16:28:04 +0100
committerAndras Timar <andras.timar@collabora.com>2018-01-17 14:23:15 +0100
commit4cbde23fb6ebde6743c2cca0eeeee916e71bcb4e (patch)
treeb6f196fa6e083ac02c13ec295882da8a56e044d8 /sc
parentfb1083dfee7dcbc1d29cff30d3b83a9b4af84988 (diff)
Resolves: tdf#114539 only pop own parameters from stack
... and not another pending one.. Change-Id: Ief5c27ccfb0b4121f2ba019e0fb8770dabbf60cf (cherry picked from commit 4b444b4c1efc2be219e6975e30048ff616fdac0f) Reviewed-on: https://gerrit.libreoffice.org/46801 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com> (cherry picked from commit a8a8559a24d043b4b1180acb3a0ff60052be5fad)
Diffstat (limited to 'sc')
-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 c42f0f4545d3..cf0553b813b9 100644
--- a/sc/source/core/tool/interpr6.cxx
+++ b/sc/source/core/tool/interpr6.cxx
@@ -926,10 +926,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();