diff options
Autocommit at 29.05.2022 @ 10:34
1 files changed, 1 insertions, 1 deletions
| -rw-r--r-- | src/Models/CellFormula.cpp | 2 |
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; |
