Fixed possible cases on infinite loop on addItem and removeItem

This commit is contained in:
Shoghi Cervantes 2013-09-04 21:29:21 +02:00
parent b56ee69f0d
commit e48126a0c9

View File

@ -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;