BuildCraft/BuildCraft — pull request #622 by immibis (2013-02-05 06:35:32+00:00)
Title: Fix world-breaking infinite loop in TransactorSimple

If TransactorSimple.getPartialStack returns a slot which TransactorSimple.addToSlot cannot add any items to, the transactor will repeatedly try to insert the item into that slot, causing the server to hang.

Currently this can happen if the inventory has a stack limit less than 64, and the number of items in that slot is at least the inventory's stack limit, but less than the item's maximum stack size, as getPartialStack was not updated in [the commit](https://github.com/BuildCraft/BuildCraft/commit/f03c00fba369ecf6538dc491f0387748b9bda26f) that added inventory stack limit support.

This pull request removes any chance of the infinite loop being triggered, now or in the future, by making TransactorSimple.inject only try each slot at most once.