summaryrefslogtreecommitdiffstats
path: root/source
diff options
context:
space:
mode:
Diffstat (limited to 'source')
-rw-r--r--source/BlockEntities/HopperEntity.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/source/BlockEntities/HopperEntity.cpp b/source/BlockEntities/HopperEntity.cpp
index 68974fdd3..fb2e36aa3 100644
--- a/source/BlockEntities/HopperEntity.cpp
+++ b/source/BlockEntities/HopperEntity.cpp
@@ -279,7 +279,8 @@ bool cHopperEntity::MoveItemsFromGrid(cItemGrid & a_Grid)
/// Moves one of the specified itemstack into this hopper. Returns true if contents have changed. Doesn't change the itemstack.
bool cHopperEntity::MoveItemsFromSlot(const cItem & a_ItemStack, bool a_AllowNewStacks)
{
- if (m_Contents.AddItem(a_ItemStack.CopyOne(), a_AllowNewStacks) > 0)
+ cItem One(a_ItemStack.CopyOne());
+ if (m_Contents.AddItem(One, a_AllowNewStacks) > 0)
{
return true;
}