mirror of
https://github.com/oldminecraftcommunity/NostalgiaCore.git
synced 2026-11-23 13:09:44 +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;
|
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…
Add table
Add a link
Reference in a new issue