summaryrefslogtreecommitdiff
path: root/src/gui
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/sell.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/gui/sell.cpp b/src/gui/sell.cpp
index a4109033..dcbdd7bd 100644
--- a/src/gui/sell.cpp
+++ b/src/gui/sell.cpp
@@ -194,8 +194,9 @@ void SellDialog::action(const gcn::ActionEvent &event)
{
// This order is important, item->getCurrentInvIndex() would return
// the inventory index of the next Duplicate otherwise.
- itemIndex = item->getCurrentInvIndex();
+ item->getCurrentInvIndex();
sellCount = item->sellCurrentDuplicate(mAmountItems);
+ itemIndex = item->getId();
Net::getNpcHandler()->sellItem(mNpcId, itemIndex, sellCount);
mAmountItems -= sellCount;
}