diff --git a/src/network/mcpe/protocol/types/SkinImage.php b/src/network/mcpe/protocol/types/SkinImage.php index 97b9f87d7..bee563295 100644 --- a/src/network/mcpe/protocol/types/SkinImage.php +++ b/src/network/mcpe/protocol/types/SkinImage.php @@ -35,6 +35,9 @@ class SkinImage{ private $data; public function __construct(int $height, int $width, string $data){ + if($height < 0 or $width < 0){ + throw new \InvalidArgumentException("Height and width cannot be negative"); + } if(($expected = $height * $width * 4) !== ($actual = strlen($data))){ throw new \InvalidArgumentException("Data should be exactly $expected bytes, got $actual bytes"); } diff --git a/src/world/Explosion.php b/src/world/Explosion.php index b6b574597..faef602d7 100644 --- a/src/world/Explosion.php +++ b/src/world/Explosion.php @@ -84,7 +84,7 @@ class Explosion{ } /** - * Calculates which blocks will be destroyed by this explosion. If explodeB() is called without calling this, no blocks + * Calculates which blocks will be destroyed by this explosion. If explodeB() is called without calling this, no blocks * will be destroyed. */ public function explodeA() : bool{