aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorobiwankennedy <renaud@rolisteam.org>2014-01-15 19:10:17 +0100
committerobiwankennedy <renaud@rolisteam.org>2014-01-15 19:10:17 +0100
commitaed4c197ba1bcb0d0289a223095481650e705dba (patch)
tree76b98482d3a7ca2eaeca7bbfd78337e56e108acd
parent26e407c1343a01f6a96bd656f25705fba8296bf3 (diff)
downloadOneRoll-aed4c197ba1bcb0d0289a223095481650e705dba.tar.gz
OneRoll-aed4c197ba1bcb0d0289a223095481650e705dba.zip
Update diceparser.cpp
correcting range parsing
-rw-r--r--diceparser.cpp24
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;
- }
-
}