3DContainerPacking icon indicating copy to clipboard operation
3DContainerPacking copied to clipboard

Fix wrong condition

Open psychopatt opened this issue 3 years ago • 0 comments

The condition of the FindBox inner loop is wrong and allows x go beyond itemsToPack[y].Quantity iterations as soon as Quantity > 1. As a result, the analyzed box may be one of another box "type", and will be analyzed again later by following iterations of outer loop.

The empty item added in Initialize serves no purpose anymore since it just prevented OutOfRange exceptions caused by the wrong check discussed above.

psychopatt avatar Jun 09 '22 10:06 psychopatt