mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-04-22 16:51:42 +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;
|
||||
}
|
||||
}
|
||||
if($add === 0){
|
||||
if($add <= 0){
|
||||
return false;
|
||||
}
|
||||
$count -= $add;
|
||||
@ -407,7 +407,7 @@ class Player{
|
||||
break;
|
||||
}
|
||||
}
|
||||
if($remove === 0){
|
||||
if($remove <= 0){
|
||||
return false;
|
||||
}
|
||||
$count -= $remove;
|
||||
|
Loading…
x
Reference in New Issue
Block a user