diff options
author | Perttu Ahola <celeron55@gmail.com> | 2011-11-29 21:05:53 +0200 |
---|---|---|
committer | Perttu Ahola <celeron55@gmail.com> | 2011-11-29 21:05:53 +0200 |
commit | 2a610b011ac2f289ebde692ab3dcf10dd4f0244f (patch) | |
tree | e5484a5b11c4dce59312c73079e288df857da4b3 /src | |
parent | cd030639a45fd58015256b125e5a646fb378683b (diff) | |
download | minetest-2a610b011ac2f289ebde692ab3dcf10dd4f0244f.tar.gz minetest-2a610b011ac2f289ebde692ab3dcf10dd4f0244f.tar.bz2 minetest-2a610b011ac2f289ebde692ab3dcf10dd4f0244f.zip |
Handle items with m_count==0 sanely when placing
Diffstat (limited to 'src')
-rw-r--r-- | src/server.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/server.cpp b/src/server.cpp index 70638a0a6..4cabcda0c 100644 --- a/src/server.cpp +++ b/src/server.cpp @@ -3361,7 +3361,7 @@ void Server::ProcessData(u8 *data, u32 datasize, u16 peer_id) if(g_settings->getBool("creative_mode") == false && ilist) { // Remove from inventory and send inventory - if(mitem->getCount() == 1) + if(mitem->getCount() <= 1) ilist->deleteItem(item_i); else mitem->remove(1); |