1
0
mirror of https://github.com/vichan-devel/vichan.git synced 2024-11-27 08:50:59 +01:00

Restrict number of dice we roll, and the number of sides, to positive values

This commit is contained in:
Michael Walker 2014-05-07 06:04:06 +01:00
parent fa284fc37a
commit cce7df20c7

View File

@ -523,7 +523,7 @@ if (isset($_POST['delete'])) {
$diceZ = intval($diceZ); $diceZ = intval($diceZ);
// Continue only if we have valid values // Continue only if we have valid values
if($diceX != 0 && $diceY != 0) { if($diceX > 0 && $diceY > 0) {
$dicerolls = array(); $dicerolls = array();
$dicesum = $diceZ; $dicesum = $diceZ;
for($i = 0; $i < $diceX; $i++) { for($i = 0; $i < $diceX; $i++) {