diff options
-rw-r--r-- | src/inventory.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/inventory.cpp b/src/inventory.cpp index c91a7411a..5ee1e34c0 100644 --- a/src/inventory.cpp +++ b/src/inventory.cpp @@ -370,7 +370,9 @@ void Inventory::addVirtualItem(const Item *const item, if (findIndexByTag(item->getInvIndex()) != -1) return; - if (index >= 0 && index < mSize && mItems[index] == nullptr) + if (index >= 0 && + index < static_cast<int>(mSize) && + mItems[index] == nullptr) { setItem(index, item->getId(), |