diff options
| author | 2020-01-29 02:12:56 +0100 | |
|---|---|---|
| committer | 2020-01-29 02:12:56 +0100 | |
| commit | a4319441d330fd334d7dfd8a0664b2cd4823fad1 (patch) | |
| tree | b5bb8992dec5e5ef0788589f3cada0f76e80d2ab | |
| parent | 097bfba45b5174a4b904e5c8474557a68365e182 (diff) | |
| download | OneRoll-a4319441d330fd334d7dfd8a0664b2cd4823fad1.tar.gz OneRoll-a4319441d330fd334d7dfd8a0664b2cd4823fad1.zip | |
Fix 1d20|3i:[>1]{"Success"}{"Failure"} command.
Prevent division by zero due to priority.
| -rw-r--r-- | node/ifnode.cpp | 2 | ||||
| -rw-r--r-- | tests/dice/tst_dice.cpp | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/node/ifnode.cpp b/node/ifnode.cpp index 01b3f81..5fa68b0 100644 --- a/node/ifnode.cpp +++ b/node/ifnode.cpp @@ -344,7 +344,7 @@ QString IfNode::toString(bool wl) const qint64 IfNode::getPriority() const { - return 4; + return 0; } ExecutionNode* IfNode::getLeafNode(ExecutionNode* node) diff --git a/tests/dice/tst_dice.cpp b/tests/dice/tst_dice.cpp index 7df2160..ba47dcf 100644 --- a/tests/dice/tst_dice.cpp +++ b/tests/dice/tst_dice.cpp @@ -430,7 +430,7 @@ void TestDice::mathPriority() QCOMPARE(resultList.size(), 1); auto value= resultList.first(); - QVERIFY(qFuzzyCompare(value, expected) == 1); + QCOMPARE(value, expected); } void TestDice::mathPriority_data() |