Skip to content

Commit

Permalink
Merge pull request #649 from codewarrior0/patch-2
Browse files Browse the repository at this point in the history
Fix large extractions on small stored item counts returning incorrect stacks
  • Loading branch information
jaquadro committed Jun 26, 2018
2 parents d653163 + abb9fc6 commit d3c2815
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ default int adjustStoredItemCount (int amount) {
int stored = getStoredItemCount();
int destroy = Math.min(Math.abs(amount), getStoredItemCount());
setStoredItemCount(stored - destroy);
return amount + destroy;
return Math.abs(amount + destroy);
} else {
return 0;
}
Expand Down

0 comments on commit d3c2815

Please sign in to comment.