diff options
| author | 2014-01-15 19:10:17 +0100 | |
|---|---|---|
| committer | 2014-01-15 19:10:17 +0100 | |
| commit | aed4c197ba1bcb0d0289a223095481650e705dba (patch) | |
| tree | 76b98482d3a7ca2eaeca7bbfd78337e56e108acd /diceparser.cpp | |
| parent | 26e407c1343a01f6a96bd656f25705fba8296bf3 (diff) | |
| download | OneRoll-aed4c197ba1bcb0d0289a223095481650e705dba.tar.gz OneRoll-aed4c197ba1bcb0d0289a223095481650e705dba.zip | |
Update diceparser.cpp
correcting range parsing
Diffstat (limited to 'diceparser.cpp')
| -rw-r--r-- | diceparser.cpp | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/diceparser.cpp b/diceparser.cpp index 2adfd28..0165d92 100644 --- a/diceparser.cpp +++ b/diceparser.cpp @@ -417,6 +417,7 @@ Validator* DiceParser::readValidator(QString& str) if(str.startsWith("]")) { str=str.remove(0,1); + isOk=true; } else { @@ -435,26 +436,25 @@ Validator* DiceParser::readValidator(QString& str) } } - else if(expectSquareBrasket) + else { - if(str.startsWith("]")) + if((expectSquareBrasket)&&(str.startsWith("]"))) { str=str.remove(0,1); + isOk=true; } - else + + + + if(isOk) { - isOk=false; + BooleanCondition* condition = new BooleanCondition(); + condition->setValue(value); + condition->setOperator(myLogicOp); + returnVal = condition; } } - if(isOk) - { - BooleanCondition* condition = new BooleanCondition(); - condition->setValue(value); - condition->setOperator(myLogicOp); - returnVal = condition; - } - } |