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:
parent
fa284fc37a
commit
cce7df20c7
2
post.php
2
post.php
@ -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++) {
|
||||||
|
Loading…
Reference in New Issue
Block a user