buildcraft/common
kouteiheika 1ec990d0c8 Bulletproof the Box class against accidental world corruption and bugs.
In some rare cases the Box's initialize() may be supplied with
coordinates equal to INT_MAX while theoretically being initialized.
Normally this would be harmless, as with every coordinate being
INT_MAX the resulting box's dimensions are zero, however anywhere
where one of the coordinates is actually used in a loop with a
"i <= coord" condition the loop counter will overflow and bad things
will happen, e.g. in FillerFlattener.iteratePattern, where
I encountered this bug, an array will overflow and take down the
whole game with it resulting in a corrupted world. (As broken INT_MAX
coordinates will get saved in NBT tags.)
2013-02-23 17:07:44 +01:00
..
buildcraft Bulletproof the Box class against accidental world corruption and bugs. 2013-02-23 17:07:44 +01:00