summaryrefslogtreecommitdiffstats
path: root/src/Protocol/Protocol18x.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/Protocol/Protocol18x.cpp')
-rw-r--r--src/Protocol/Protocol18x.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/Protocol/Protocol18x.cpp b/src/Protocol/Protocol18x.cpp
index d9449283b..d5dd328a4 100644
--- a/src/Protocol/Protocol18x.cpp
+++ b/src/Protocol/Protocol18x.cpp
@@ -1921,12 +1921,11 @@ void cProtocol180::AddReceivedData(const char * a_Data, size_t a_Size)
{
// Decompress the data:
AString CompressedData;
- if (!m_ReceivedData.ReadString(CompressedData, CompressedSize))
+ if (!m_ReceivedData.ReadString(CompressedData, CompressedSize) || (InflateString(CompressedData.data(), CompressedSize, UncompressedData) != Z_OK))
{
m_Client->Kick("Compression failure");
return;
}
- InflateString(CompressedData.data(), CompressedSize, UncompressedData);
PacketLen = UncompressedData.size();
}
else
@@ -2693,7 +2692,7 @@ void cProtocol180::HandlePacketWindowClick(cByteBuffer & a_ByteBuffer)
case 0x0206: Action = caNumber7; break;
case 0x0207: Action = caNumber8; break;
case 0x0208: Action = caNumber9; break;
- case 0x0300: Action = caMiddleClick; break;
+ case 0x0302: Action = caMiddleClick; break;
case 0x0400: Action = (SlotNum == SLOT_NUM_OUTSIDE) ? caLeftClickOutsideHoldNothing : caDropKey; break;
case 0x0401: Action = (SlotNum == SLOT_NUM_OUTSIDE) ? caRightClickOutsideHoldNothing : caCtrlDropKey; break;
case 0x0500: Action = (SlotNum == SLOT_NUM_OUTSIDE) ? caLeftPaintBegin : caUnknown; break;