mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-07-10 20:08:01 +00:00
Fixed possible cases on infinite loop on addItem and removeItem
This commit is contained in:
parent
b56ee69f0d
commit
e48126a0c9
@ -382,7 +382,7 @@ class Player{
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if($add === 0){
|
if($add <= 0){
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
$count -= $add;
|
$count -= $add;
|
||||||
@ -407,7 +407,7 @@ class Player{
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if($remove === 0){
|
if($remove <= 0){
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
$count -= $remove;
|
$count -= $remove;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user