From: Perttu Ahola Date: Tue, 29 Nov 2011 19:05:53 +0000 (+0200) Subject: Handle items with m_count==0 sanely when placing X-Git-Url: http://81.2.79.47:8989/gitweb/?a=commitdiff_plain;h=2a610b011ac2f289ebde692ab3dcf10dd4f0244f;p=zefram%2Fminetest%2Fminetest_engine.git Handle items with m_count==0 sanely when placing --- diff --git a/src/server.cpp b/src/server.cpp index 70638a0a..4cabcda0 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);