diff --git a/html/StupidIABattleship.php b/html/StupidIABattleship.php index 202cc2e..bf3ecd4 100644 --- a/html/StupidIABattleship.php +++ b/html/StupidIABattleship.php @@ -207,7 +207,7 @@ switch($_POST['act']){ echo json_encode($shipsCoords); break; case "fight": - if((is_int($_POST['width'])) && (is_int($_POST['height']))){ + if((is_int(settype($_POST['width'],"integer"))) && (is_int(settype($_POST['height']),"integer")){ echo rand(0,$_POST['width']).",".$_POST['height']; }else{ echo "boaf".$_POST['width']."-".$_POST['height'];