From cce7df20c77f4a4e2c6b04e019e602b15166f4e4 Mon Sep 17 00:00:00 2001 From: Michael Walker Date: Wed, 7 May 2014 06:04:06 +0100 Subject: [PATCH] Restrict number of dice we roll, and the number of sides, to positive values --- post.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/post.php b/post.php index c39355d6..574de077 100644 --- a/post.php +++ b/post.php @@ -523,7 +523,7 @@ if (isset($_POST['delete'])) { $diceZ = intval($diceZ); // Continue only if we have valid values - if($diceX != 0 && $diceY != 0) { + if($diceX > 0 && $diceY > 0) { $dicerolls = array(); $dicesum = $diceZ; for($i = 0; $i < $diceX; $i++) {