diff options
| -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; - } - } |