Removed any possibility of TransactorSimple entering an infinite loop when getPartialSlot and addToSlot disagree.

This commit is contained in:
immibis 2013-02-05 19:33:04 +13:00
parent 78745179ce
commit b4d9b73a99

View file

@ -17,8 +17,8 @@ public class TransactorSimple extends Transactor {
int injected = 0;
int slot = 0;
while ((slot = getPartialSlot(stack, orientation, slot)) >= 0 && injected < stack.stackSize) {
int slot = -1;
while ((slot = getPartialSlot(stack, orientation, slot + 1)) >= 0 && injected < stack.stackSize) {
injected += addToSlot(slot, stack, injected, doAdd);
}