Random Things

Random Things

44M Downloads

Spectre Energy Injector says it can take more energy then it can at Integer limits.

cjm721 opened this issue ยท 2 comments

commented

If you ask an energy injector if it can receive Interger.MAX_VALUE it responds with it can take Integer.MAX_VALUE even though it can only store 1M.

Effectively deleting the energy. Also the energy then goes negative according to wailia.

commented

Overflow appears to be happening here.

int newEnergy = Math.min(MAX_ENERGY, currentEnergy + maxReceive);

commented

Almost definitely related to this, but I had an energy injector hooked up to a Draconic Evolution T7 energy core using a cryo-stabilized fluxduct, and this bug results in all of the energy in the core being deleted almost instantly donce the core has more than 2.147G RF in it.