Followup #2556, #2579: Prevent negative stacksizes.

This commit is contained in:
yueh 2016-11-05 23:37:34 +01:00
parent 3a8d6d0bcd
commit 70fe5189e0

View file

@ -793,7 +793,7 @@ public abstract class AEBaseContainer extends Container
{ {
if( hand == null ) if( hand == null )
{ {
is.stackSize--; is.stackSize = Math.max( 1, is.stackSize - 1 );
} }
else if( hand.isItemEqual( is ) ) else if( hand.isItemEqual( is ) )
{ {