diff options
Diffstat (limited to 'src/gui')
-rw-r--r-- | src/gui/itemcontainer.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/gui/itemcontainer.cpp b/src/gui/itemcontainer.cpp index 0cdb8864..67cb5251 100644 --- a/src/gui/itemcontainer.cpp +++ b/src/gui/itemcontainer.cpp @@ -49,7 +49,7 @@ ItemContainer::ItemContainer(Inventory *inventory): if (!selImg) logger->error("Unable to load selection.png"); selectedItem = 0; // No item selected - maxItems = mInventory->getLastUsedSlot(); + maxItems = mInventory->getLastUsedSlot() - 1; // Count from 0, usage from 2 addMouseListener(this); } @@ -64,7 +64,7 @@ void ItemContainer::logic() { gcn::Widget::logic(); - int i = mInventory->getLastUsedSlot(); + int i = mInventory->getLastUsedSlot() - 1; // Count from 0, usage from 2 if (i != maxItems) { maxItems = i; |