aboutsummaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorGravatar jesopo2019-09-26 14:31:38 +0100
committerGravatar jesopo2019-09-26 14:31:38 +0100
commitab51bbaefaa3d5e8d7b8de9c384578ad78eb671a (patch)
tree070b036e46ae480d01f80761d844c34d9664d77e /modules
parentalso show "total" when there's modifiers (diff)
signature
only permit 3-digit modifiers
Diffstat (limited to 'modules')
-rw-r--r--modules/dice.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/modules/dice.py b/modules/dice.py
index 38ce3441..464d98d1 100644
--- a/modules/dice.py
+++ b/modules/dice.py
@@ -4,7 +4,7 @@ import random, re
from src import ModuleManager, utils
ERROR_FORMAT = "Incorrect format! Format must be [number]d[number], e.g. 1d20"
-RE_DICE = re.compile("([1-9]\d*)d([1-9]\d*)((?:[-+][1-9]\d*)*)", re.I)
+RE_DICE = re.compile("^([1-9]\d*)d([1-9]\d*)((?:[-+][1-9]\d{,2})*)$", re.I)
RE_MODIFIERS = re.compile("([-+]\d+)")
MAX_DICE = 6