Website Summary Files Commits Branches @commit @diff @stats
path: root / src / Models / CellFormula.cpp
diff options
context:
space:
mode:
1 files changed, 1 insertions, 1 deletions
-rw-r--r--src/Models/CellFormula.cpp2
diff --git a/src/Models/CellFormula.cpp b/src/Models/CellFormula.cpp
index 2425ea8..98e1abb 100644
--- a/src/Models/CellFormula.cpp
+++ b/src/Models/CellFormula.cpp
@@ -14,7 +14,7 @@ double pow(double x, unsigned y) {
double CellFormula::calculate(unsigned index) {
double lval = formula[index].left->getNumeralValue();
- if (formula[index].right < 0) {
+ while (formula[index].right < 0) {
switch (-formula[index++].right) {
case '+' : lval += formula[index].left->getNumeralValue(); break;
case '-' : lval -= formula[index].left->getNumeralValue(); break;