From 2a610b011ac2f289ebde692ab3dcf10dd4f0244f Mon Sep 17 00:00:00 2001 From: Perttu Ahola Date: Tue, 29 Nov 2011 21:05:53 +0200 Subject: [PATCH] Handle items with m_count==0 sanely when placing --- src/server.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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); -- 2.30.2