projects
/
zefram
/
minetest
/
minetest_engine.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
96c3045
)
Fix conditional bug in inventory
author
Giuseppe Bilotta
<giuseppe.bilotta@gmail.com>
Thu, 1 Dec 2011 08:13:43 +0000
(09:13 +0100)
committer
Perttu Ahola
<celeron55@gmail.com>
Thu, 1 Dec 2011 08:41:24 +0000
(10:41 +0200)
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.
src/inventory.cpp
patch
|
blob
|
history
diff --git
a/src/inventory.cpp
b/src/inventory.cpp
index 5523f7c91fd1cc810749c2d63553f8c7a7ff59ed..e8475b741b0e6740ad7f5a0b59f7e7df6886cb7e 100644
(file)
--- 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)
{