From 55a5f11b1b1108556520f8ee7a583b0ab17123dc Mon Sep 17 00:00:00 2001 From: Mattes D Date: Tue, 23 Jun 2015 15:23:11 +0200 Subject: Fixed right-click with bonemeal. The client would send invalid right-click events with Y set to 0x7ff, which would crash the server. Only process bonemeal for valid clicks (valid blockface). --- src/Items/ItemDye.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Items/ItemDye.h b/src/Items/ItemDye.h index 273af826a..c2635bcb6 100644 --- a/src/Items/ItemDye.h +++ b/src/Items/ItemDye.h @@ -27,7 +27,7 @@ public: ) override { // Handle growing the plants: - if (a_Item.m_ItemDamage == E_META_DYE_WHITE) + if ((a_Item.m_ItemDamage == E_META_DYE_WHITE) && (a_BlockFace != BLOCK_FACE_NONE)) { if (a_World->GrowRipePlant(a_BlockX, a_BlockY, a_BlockZ, true)) { -- cgit v1.2.3