Division by zero extracting items from EMC Link using Pipez item pipes
James103 opened this issue ยท 1 comments
The following line may crash if the EMC value for the ItemStack
passed in is zero.
To be more specific, if ProjectEAPI.getEMCProxy().getValue(itemStack)
returns zero, then the division in the above line tries to divide a BigInteger value by zero, throwing java.lang.ArithmeticException: BigInteger divide by zero
and crashing the game.
Fixing this will likely need a guard that checks if ProjectEAPI.getEMCProxy().getValue(itemStack)
is zero, and if so returns ItemStack.EMPTY
(i.e. no item).
See also AllTheMods/ATM-8#811
Fixed in 1.0.6