diff options
| -rw-r--r-- | node/keepdiceexecnode.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/node/keepdiceexecnode.cpp b/node/keepdiceexecnode.cpp index 2ca54f4..64d53f0 100644 --- a/node/keepdiceexecnode.cpp +++ b/node/keepdiceexecnode.cpp @@ -43,6 +43,10 @@ m_previousNode = previous; { QList<Die*> diceList=previousDiceResult->getResultList(); QList<Die*> diceList2 = diceList.mid(0,m_numberOfDice); + if(m_numberOfDice > diceList.size()) + { + m_errors.insert(TOO_MANY_DICE,QObject::tr(" You ask to keep %1 dice but the result only has %2").arg(m_numberOfDice).arg(diceList.size())); + } foreach(Die* tmp,diceList.mid(m_numberOfDice,-1)) { |