Website Summary Files Commits Branches @commit @diff @stats
path: root / src / Models / CellFormula.cpp
diff options
context:
space:
mode:
Commite76bee3e7aaa901b3134a654cca4a97bd90af757 (patch)
Author
 Syndamia <kamen@syndamia.com>
2022-05-29 14:20:03 +0300
Committer
 Syndamia <kamen@syndamia.com>
2022-05-29 14:20:03 +0300
Filesdbfdb9f3af90e4c2dafe8120e09d1c32cd1867c9 /src/Models/CellFormula.cpp
FMI-OOP-P2_Tables-e76bee3e7aaa901b3134a654cca4a97bd90af757.tar
FMI-OOP-P2_Tables-e76bee3e7aaa901b3134a654cca4a97bd90af757.tar.gz
FMI-OOP-P2_Tables-e76bee3e7aaa901b3134a654cca4a97bd90af757.zip
Parent36dfbb2bb4155194d42a8d7245d64f0da11bd847 (diff)
Autocommit at 29.05.2022 @ 14:20
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 fda6ed2..76c9150 100644
--- a/src/Models/CellFormula.cpp
+++ b/src/Models/CellFormula.cpp
@@ -83,7 +83,7 @@ void CellFormula::parseAndSetValue(const char* str) {
if (currOp == '^') currOp *= -1;
else if ((currOp == '+' || currOp == '-') && formula.get_count() != 0) {
Pair<Cell*, char>& prev = formula[formula.get_count() - 1];
- if (prev.right == '*' || prev.right == '/') prev.right *= -1;
+ if (prev.right == '*' || prev.right == '/' || prev.right == '-') prev.right *= -1;
}
formula.add({cellToAdd, currOp});