summaryrefslogtreecommitdiff
path: root/src/gui/sell.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/sell.cpp')
-rw-r--r--src/gui/sell.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/gui/sell.cpp b/src/gui/sell.cpp
index 2a2a591e..8140c013 100644
--- a/src/gui/sell.cpp
+++ b/src/gui/sell.cpp
@@ -140,9 +140,11 @@ void SellDialog::addItem(short index, int price)
return;
ITEM_SHOP item_shop;
+ std::stringstream ss;
- sprintf(item_shop.name, "%s %i gp",
- item->getInfo()->getName().c_str(), price);
+ ss << item->getInfo()->getName() << " " << price << " GP";
+
+ item_shop.name = ss.str();
item_shop.price = price;
item_shop.index = index;
item_shop.id = item->getId();;