From 3c8367240a4f9a276d1aa671ed779e184becf92a Mon Sep 17 00:00:00 2001 From: 8chan Date: Sat, 30 Aug 2014 20:07:08 +0000 Subject: [PATCH] Arbitrary maximum dice --- inc/functions.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/inc/functions.php b/inc/functions.php index 33f22942..5380c14a 100644 --- a/inc/functions.php +++ b/inc/functions.php @@ -2360,6 +2360,11 @@ function diceRoller($post) { $diceY = intval($diceY); $diceZ = intval($diceZ); + // Arbitrary maximum number of dice + if ($diceX > 200) { + $diceX = 200; + } + // Continue only if we have valid values if($diceX > 0 && $diceY > 0) { $dicerolls = array();