diff options
| author | 2020-09-12 15:59:02 +0200 | |
|---|---|---|
| committer | 2020-09-12 15:59:02 +0200 | |
| commit | 2e6f5d9174b1ade9d3c3ff4a81b210313480a104 (patch) | |
| tree | e2cba1c6c0ace0ce5b5f4bd3a845167ed8b14a1f /parsingtoolbox.cpp | |
| parent | 1f1ce3016fe8589d5b182e244e00333a1f35f1d0 (diff) | |
| download | OneRoll-2e6f5d9174b1ade9d3c3ff4a81b210313480a104.tar.gz OneRoll-2e6f5d9174b1ade9d3c3ff4a81b210313480a104.zip | |
fix output change.
Diffstat (limited to 'parsingtoolbox.cpp')
| -rw-r--r-- | parsingtoolbox.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/parsingtoolbox.cpp b/parsingtoolbox.cpp index 6224d13..f009155 100644 --- a/parsingtoolbox.cpp +++ b/parsingtoolbox.cpp @@ -1123,7 +1123,7 @@ QString ParsingToolBox::replaceVariableToValue(const QString& source, QStringLis do { auto ref= readVariableFromString(source, start); - if(ref.resultIndex() >= values.size()) + if(ref.resultIndex() > values.size()) { auto error= QString("No valid value at index: $%1").arg(ref.resultIndex()); errorMap.insert(Dice::ERROR_CODE::INVALID_INDEX, error); @@ -2357,7 +2357,7 @@ ExportedDiceResult ParsingToolBox::finalDiceResultFromInstruction(ExecutionNode* faces= die->getFaces(); HighLightDice hlDice(die->getListValue(), die->isHighlighted(), die->getColor(), die->hasBeenDisplayed(), die->getFaces(), die->getUuid()); - if(alreadyAdded.find(die->getUuid()) == alreadyAdded.end()) + if(alreadyAdded.find(die->getUuid()) == alreadyAdded.end() && !hlDice.displayed()) { list.append(hlDice); alreadyAdded.insert(die->getUuid()); @@ -2370,10 +2370,10 @@ ExportedDiceResult ParsingToolBox::finalDiceResultFromInstruction(ExecutionNode* nodeResult.insert(faces, vals); } } - if(nodeResult.isEmpty()) + /*if(nodeResult.isEmpty()) result= result->getPrevious(); - else - result= nullptr; + else*/ + result= result->getPrevious(); } return nodeResult; } |