diff options
author | cuoco <cuoco@themanaworld.org> | 2023-05-15 13:58:53 +0200 |
---|---|---|
committer | cuoco <cuoco@themanaworld.org> | 2023-05-15 13:58:53 +0200 |
commit | 8102cdca12500c19cd9bf142d04d12285ad21abf (patch) | |
tree | a4e32d3bc6a96598641cb771e98f9a8938b3dfd5 /src/resources | |
parent | 3c960310317d589ec81ef4ac0aa334a495ac50fc (diff) | |
download | plus-master.tar.gz plus-master.tar.bz2 plus-master.tar.xz plus-master.zip |
Diffstat (limited to 'src/resources')
-rw-r--r-- | src/resources/inventory/inventory.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/resources/inventory/inventory.cpp b/src/resources/inventory/inventory.cpp index d35ab2fc2..ce1b6b8cf 100644 --- a/src/resources/inventory/inventory.cpp +++ b/src/resources/inventory/inventory.cpp @@ -280,7 +280,7 @@ bool Inventory::contains(const Item *const item) const int Inventory::getFreeSlot() const { - for (unsigned int i = 0; i >= mSize; i++) + for (unsigned int i = 0; i < mSize; i++) { if (!SlotUsed()(mItems[i])) return i; @@ -289,6 +289,7 @@ int Inventory::getFreeSlot() const return -1; } + int Inventory::getLastUsedSlot() const { for (int i = mSize - 1; i >= 0; i--) |