mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-06-07 20:28:31 +00:00
EffectCommand: fix bounds check, closes #2055
This commit is contained in:
parent
8913b48700
commit
243c12de7c
@ -83,7 +83,7 @@ class EffectCommand extends VanillaCommand{
|
|||||||
$amplification = 0;
|
$amplification = 0;
|
||||||
|
|
||||||
if(count($args) >= 3){
|
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;
|
return false;
|
||||||
}
|
}
|
||||||
$duration = $d * 20; //ticks
|
$duration = $d * 20; //ticks
|
||||||
|
Loading…
x
Reference in New Issue
Block a user