diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/gui/itemamountwindow.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/gui/itemamountwindow.cpp b/src/gui/itemamountwindow.cpp index 3e22246b5..1751f6043 100644 --- a/src/gui/itemamountwindow.cpp +++ b/src/gui/itemamountwindow.cpp @@ -388,18 +388,18 @@ void ItemAmountWindow::action(const gcn::ActionEvent &event) if (event.getId() == "incPrice") { mPrice++; - price = static_cast<int>(pow(10, mPrice)); + price = static_cast<int>(pow(10.0, mPrice)); } else if (event.getId() == "decPrice") { mPrice--; - price = static_cast<int>(pow(10, mPrice)); + price = static_cast<int>(pow(10.0, mPrice)); } else if (event.getId() == "slidePrice") { price = static_cast<int>(mItemPriceSlide->getValue()); if (price) - mPrice = static_cast<int>(log(price)); + mPrice = static_cast<int>(log(static_cast<float>(price))); else mPrice = 0; } |