EffectCommand: fix bounds check, closes #2055

This commit is contained in:
Dylan K. Taylor 2019-02-13 14:37:40 +00:00
parent 8913b48700
commit 243c12de7c

View File

@ -83,7 +83,7 @@ class EffectCommand extends VanillaCommand{
$amplification = 0;
if(count($args) >= 3){
if(($d = $this->getBoundedInt($sender, $args[2], 0, INT32_MAX)) === null){
if(($d = $this->getBoundedInt($sender, $args[2], 0, (int) (INT32_MAX / 20))) === null){
return false;
}
$duration = $d * 20; //ticks