summaryrefslogtreecommitdiff
path: root/src/inventory.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/inventory.cpp')
-rw-r--r--src/inventory.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/inventory.cpp b/src/inventory.cpp
index d72e0e4a..3d1a4786 100644
--- a/src/inventory.cpp
+++ b/src/inventory.cpp
@@ -128,7 +128,7 @@ bool Inventory::contains(Item *item) const
int Inventory::getFreeSlot() const
{
- Item **i = std::find_if(mItems, mItems + mSize,
+ Item **i = std::find_if(mItems + mOffset, mItems + mSize,
std::not1(SlotUsed()));
return (i == mItems + mSize) ? -1 : (i - mItems);
}