summaryrefslogtreecommitdiff
path: root/sc/source
diff options
context:
space:
mode:
authorEike Rathke <erack@redhat.com>2017-12-19 16:28:04 +0100
committerChristian Lohmaier <lohmaier+LibreOffice@googlemail.com>2017-12-19 20:23:39 +0100
commit3fb74dbbe2ccce8daf83a189fe8bd567ac29259b (patch)
treee8420f790a18bc65f887e985e04eeba248e3f8bb /sc/source
parentcef80e35268170fd57ed39cdf5256fb7d28f92cd (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/46800 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
Diffstat (limited to 'sc/source')
-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();