mirror of
https://github.com/oldminecraftcommunity/NostalgiaCore.git
synced 2026-11-21 03:59:43 +00:00
Fixed possible cases on infinite loop on addItem and removeItem
This commit is contained in:
parent
b56ee69f0d
commit
e48126a0c9
1 changed files with 2 additions and 2 deletions
|
|
@ -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…
Add table
Add a link
Reference in a new issue