fix dice crash

This commit is contained in:
Dominic Brady 2012-11-24 13:18:18 +00:00
parent 96b2dd0ddd
commit 7faa5c1207

View File

@ -17,6 +17,14 @@ var parseDiceSpec = function (specString) {
var normalizeDiceSpec = function (specString) {
var diceSpec = parseDiceSpec(specString);
if (diceSpec["sides"] > 10000) {
return false;
}
if (diceSpec["count"] > 1000) {
return false;
}
if (diceSpec["count"] > 1) {
var count = diceSpec["count"];
} else {