aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGiuseppe Bilotta <giuseppe.bilotta@gmail.com>2011-12-01 09:13:43 +0100
committerPerttu Ahola <celeron55@gmail.com>2011-12-01 10:41:24 +0200
commitaab50cd2cc94743d527bfffe46027d4ab765e99a (patch)
tree732ee41d78bfb8a81a24057b29a60caeae7dd19d /src
parent96c30452f9d2e6085769baa5befbcbcf62a507c4 (diff)
downloadminetest-aab50cd2cc94743d527bfffe46027d4ab765e99a.tar.gz
minetest-aab50cd2cc94743d527bfffe46027d4ab765e99a.tar.bz2
minetest-aab50cd2cc94743d527bfffe46027d4ab765e99a.zip
Fix conditional bug in inventory
A spurious semicolon after the conditional checking for the drop count to be not higher than the owned count caused the subsequent count = getCount() to be always executed. Fix by removing the extra semicolon.
Diffstat (limited to 'src')
-rw-r--r--src/inventory.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/inventory.cpp b/src/inventory.cpp
index 5523f7c91..e8475b741 100644
--- a/src/inventory.cpp
+++ b/src/inventory.cpp
@@ -212,7 +212,7 @@ bool InventoryItem::dropOrPlace(ServerEnvironment *env,
s16 dropcount = getDropCount();
if(count < 0 || count > dropcount)
count = dropcount;
- if(count < 0 || count > getCount());
+ if(count < 0 || count > getCount())
count = getCount();
if(count > 0)
{