Skip to content

Commit

Permalink
[MouseItemWidget] Fixed small issue related to item duplication. Fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Unarelith committed Jul 18, 2020
1 parent fae51bc commit 73b3fbf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion source/client/gui/MouseItemWidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ void MouseItemWidget::draggingBehaviour(ItemWidget *newItemWidget) {
}
}

u16 remainingAmount = (m_draggedStack.amount() == 1) ? 0 : m_draggedStack.amount() % m_draggedSlots.size();
u16 remainingAmount = (m_draggedStack.amount() == 1) ? 0 : m_draggedStack.amount() % std::min<u16>(m_draggedSlots.size(), m_draggedStack.amount());

setStack(remainingAmount ? m_draggedStack.item().stringID() : BLOCK_AIR, remainingAmount);
}
Expand Down

0 comments on commit 73b3fbf

Please sign in to comment.