summaryrefslogtreecommitdiff
path: root/src/inventory.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2015-10-30 00:47:20 +0300
committerAndrei Karas <akaras@inbox.ru>2015-10-30 00:47:20 +0300
commit2c8d567dfe173e6b0f652dc60f8e289c77200df2 (patch)
tree10dfeccdef82090859db3df5574c81822fc8ada6 /src/inventory.cpp
parent1b653c7c1a3e6c5d7b2739f881ea6b11ca46cd3b (diff)
downloadmv-2c8d567dfe173e6b0f652dc60f8e289c77200df2.tar.gz
mv-2c8d567dfe173e6b0f652dc60f8e289c77200df2.tar.bz2
mv-2c8d567dfe173e6b0f652dc60f8e289c77200df2.tar.xz
mv-2c8d567dfe173e6b0f652dc60f8e289c77200df2.zip
Fix compilation warning.
Diffstat (limited to 'src/inventory.cpp')
-rw-r--r--src/inventory.cpp4
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(),