Website Summary Files Commits Branches @commit @diff @stats
path: root / src / Models / CellFormula.cpp
diff options
context:
space:
mode:
Commitcf3abe4c719d08564d06f37933ca984ce72ddc18 (patch)
Author
 Syndamia <kamen@syndamia.com>
2022-05-29 14:50:14 +0300
Committer
 Syndamia <kamen@syndamia.com>
2022-05-29 14:50:14 +0300
Files2da8bedbc536736a6ec10a244d1149744393ef8c /src/Models/CellFormula.cpp
FMI-OOP-P2_Tables-cf3abe4c719d08564d06f37933ca984ce72ddc18.tar
FMI-OOP-P2_Tables-cf3abe4c719d08564d06f37933ca984ce72ddc18.tar.gz
FMI-OOP-P2_Tables-cf3abe4c719d08564d06f37933ca984ce72ddc18.zip
Parent1bbfed319336bf6002e4bc47c11c0260386320b9 (diff)
Autocommit at 29.05.2022 @ 14:50
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 2e2636d..82806eb 100644
--- a/src/Models/CellFormula.cpp
+++ b/src/Models/CellFormula.cpp
@@ -80,7 +80,7 @@ void CellFormula::parseAndSetValue(const char* str) {
if (currOp == '^') currOp *= -1;
else if ((currOp == '+' || currOp == '-') && formula.get_count() != 0) {
- for (unsigned i = formula.get_count() - 1; (formula[i].right == '*' || formula[i].right == '/') && i > 0; i--)
+ for (unsigned i = formula.get_count() - 1; i < formula.get_count() && (formula[i].right == '*' || formula[i].right == '/'); i--)
if (formula[i].right > 0) formula[i].right *= -1;
}